moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
3.45k stars 117 forks source link

Create a dynamic menu in "Create Shortcut" position, then move "Create Shorcut" into the menu i just created #98

Closed coinkillerl closed 1 year ago

coinkillerl commented 1 year ago

I can't figure out how to do this. What i want to do, is basically replace the "Create Shortcut" item with a dynamic menu, and then place the "Create Shortcut" item into the menu, along with a few more options. The menu needs to be located where the "Create Shortcut" item is normallu located.

It should look something like this :

...
-------
Create Shortcut >sub0 Normal (performs "create shortcut" command)
                >sub1 Symbolic (custom cmd)
                >sub2 Hard (custom cmd)
Delete
Rename
-------
...

is this possible on 1.8?

moudey commented 1 year ago

You can customize it easily see the following example:

    static
    {
        item(where=this.id==id.create_shortcut pos=0 sep="bottom" title="Normal" menu=id.create_shortcut.title)
    }

    dynamic
    {
        menu(type='file|dir' pos=indexof(id.cut.title) title=id.create_shortcut.title sep="both" image=icon.create_shortcut)
        {
            item(title="Symbolic")
            item(title="Hard")
        }
    }

Download this build and try it

screenshot

coinkillerl commented 1 year ago

Thanks, i have 3 other questions :

  1. Is there any way to repeat a command for each selected item when multiple items are selected?
  2. Is there any way to make a glyph use the accent color instead of being just white?
  3. Will some various missing icons (like open, open in new tab, etc.) be added?
moudey commented 1 year ago
  1. Is there any way to repeat a command for each selected item when multiple items are selected?

Add a foreach property to the item with the value 1 or true

  1. Is there any way to make a glyph use the accent color instead of being just white?

image=[\ue008, #0f0] or The color can be changed from the general settings

shell  {
    set  {
        theme  {
            image.color=[#f00, #0f0]
        }
    }
}
  1. Will some various missing icons (like open, open in new tab, etc.) be added?

Please provide me with a screenshot of this issue.

coinkillerl commented 1 year ago

Thanks! The foreach=true method worked perfectly, i couldn't find in in the docs, is this a new 1.8 beta feature? About the image.color property, setting it prevents shell from opening on beta 1.8, does that only work for the build you just sent? About the missing icons, Open, Open in new tab, Edit, Undo and Redo icon are missing image image trying to set them manually with Image=icon.x will not work and they'll still be blank, you must use a glyph or an external resource, however, glyphs if set like this (Image=[\uXXXX]) will only be monochrome, and the accent color does not get applied, unlike the icon.x ones.

moudey commented 1 year ago

The latest version made some changes to it, so you will find it somewhat different from the previous version, especially in the settings section