Shell
Shell copied to clipboard
Is it posible to move a static item into a dynamic menu?
Hello, I want to bring static item "HashMyFiles" into Dynamic menu "File Manage". Is it possible?
Yes, static and dynamic items are combined through the parent property. The following code shows how to combine
shell
{
static
{
item(find='HashMyFiles' parent="File Manage")
item(find='File Manage' image=#f00 pos=top sep=bottom)
}
dynamic
{
item(title="copy path" parent="File Manage")
}
}
It is also possible to move several items at once through the following code
item(find='HashMyFiles|"copy long name"|copy long path|"path copy"' parent="File Manage")
Yes, static and dynamic items are combined through the parent property
Now I have 2 "File manage" which I don't want.
The current structure is "Static" then "Dynamic". Shouldn't It be "Dynamic" first then "Static"? By that way, we can create dynamic menus/items first, then in static we can position items added by the system or by a third party into our dynamic menus
The two entries appeared because you did not add the parent property to the dynamic item.
dynamic
{
menu(title="File Manage from dynamic" parent="File Manage") { ... }
}
Priority for static items. To move items from menu to another parent or move them to a top level, remove the title property.
shell
{
static
{
item(find='HashMyFiles' parent="File Manage")
item(find='File Manage' image=#f00 pos=top sep=bottom)
}
dynamic
{
menu(parent="File Manage")
{
item(title='item 1')
item(title='item 2')
item(title='item 3')
}
}
}
Hello, shell.shl is provided with Dynamic "File Manage" menu. I did not modify it. What I want is to move my "HashMyFiles" item into that Dynamic "File Manage" menu. I don't want to put the Dynamic "File Manage" menu into the Static "File Manage" menu
And the below code create 2 "File Manage": 1 Dynamic and 1 Static
static
{
item(find='HashMyFiles' parent="File manage")
item(find='File manage' image=#f00 pos=top sep=bottom)
}
dynamic
{
menu(type='file|dir|drive|namespace|back' mode=multiple title='File manage' image=\uE0F8)
{
menu(separator=after title='Copy Path' [email protected]_path)
{
item([email protected] > 1 title='Copy (@sel.count) items selected' [email protected](sel(false, "\n")))
item(mode=single title="Full Path" tip=[sel.path, 0,0] [email protected](sel.path))
item(mode=single type='file|dir|back.dir' [email protected]!=sel.path.len title="Short Path" tip=[sel.short, 0,0] [email protected](sel.short))
item(mode=single type='file' separator=before find='.lnk' title='open file location')
separator
item(mode=single [email protected]>3 title="Parent" tip=[sel.parent,0,0] [email protected](sel.parent))
separator
item(mode=single type='file|dir|back.dir' title="Name" tip=[sel.file.name,0,0] [email protected](sel.file.name))
item(mode=single type='file' [email protected] != @sel.file.title.len title="Title" tip=[sel.file.title,0,0] [email protected](sel.file.title))
item(mode=single type='file' [email protected]>0 title="Extension" tip=[" " + sel.file.ext + " ",0,0] [email protected](sel.file.ext))
}
...
...
}
}
Moving static items directly to dynamic items is not currently supported
If the structure is "dynamic" then "static", should it be easier?
dynamic
{
menu(type='file|dir|drive|namespace|back' mode=multiple title='File manage' image=\uE0F8)
{
menu(separator=after title='Copy Path' [email protected]_path)
{
item([email protected] > 1 title='Copy (@sel.count) items selected' [email protected](sel(false, "\n")))
item(mode=single title="Full Path" tip=[sel.path, 0,0] [email protected](sel.path))
item(mode=single type='file|dir|back.dir' [email protected]!=sel.path.len title="Short Path" tip=[sel.short, 0,0] [email protected](sel.short))
item(mode=single type='file' separator=before find='.lnk' title='open file location')
separator
item(mode=single [email protected]>3 title="Parent" tip=[sel.parent,0,0] [email protected](sel.parent))
separator
item(mode=single type='file|dir|back.dir' title="Name" tip=[sel.file.name,0,0] [email protected](sel.file.name))
item(mode=single type='file' [email protected] != @sel.file.title.len title="Title" tip=[sel.file.title,0,0] [email protected](sel.file.title))
item(mode=single type='file' [email protected]>0 title="Extension" tip=[" " + sel.file.ext + " ",0,0] [email protected](sel.file.ext))
}
...
...
}
}
static
{
item(find='HashMyFiles' parent="File manage")
}
It's not about the order of writing static and dynamic. But I will make it easier in the future.
@moudey Since this feature is essential for me, may I know how far in the future we can have this feature supported?
Since this feature is essential for me, may I know how far in the future we can have this feature supported?
work on it
@Mark-Joy Move dynamic and static items to other sub menus. It will be available soon.
shell
{
static
{
item(find='7-zip' pos=1 parent="/level 1")
item(find='rar|cab|"*"' in='/level 1/7-zip/open archive' vis=disabled)
}
dynamic
{
menu(mode=multiple title='level 1' image=#a00)
{
item(title='item 1')
menu(title='level 2')
{
item(title='item 2')
}
}
item(mode=multiple title='item 3' pos=bottom image=#0a0 parent='/level 1/7-zip/open archive')
item(mode=multiple title='item 4' pos=1 image=#0a0 parent='/level 1')
}
}
Hi @Mark-Joy Please test this build
shell
{
static
{
item(find='7-zip' pos=1 parent="/level 1")
item(find='rar|cab|"*"' in='/level 1/7-zip/open archive' vis=disabled)
}
dynamic
{
menu(mode=multiple title='level 1' image=#a00)
{
item(title='item 1')
menu(title='level 2')
{
item(title='item 2')
}
}
item(mode=multiple title='item 3' pos=bottom image=#0a0 parent='/level 1/7-zip/open archive')
item(mode=multiple title='item 4' pos=1 image=#0a0 parent='/level 1')
}
}