Add Context Menu Item Only for Selected Folders (Not Inside Folders)

Hi everyone!

I’m trying to enhance my workflow by adding some custom context menu items in Dolphin.

Currently, using MimeType=inode/directory adds the context menu item both when I select a folder and when I right-click inside a folder’s empty area. I would like to know if there’s a way to add a context menu item only for selected folders without it showing up when I’m already inside the folder and clicking on the empty area.

Does anyone know if this is possible or have any ideas for achieving this?

Thanks in advance!

What exactly would the service need to do?

The context menu item I’m trying to add is for creating symlinks.
I understand that it could work just fine even if the option appears when clicking on the empty area, it’s more about customizing the behavior to fit my preference rather than practicality.

Hmm…difficult one because, since it uses directory mime, it probably will be in the toplevel, regardless.
You could maybe make a script, assign a desktop app to it and set it to open directories with in system settings.

Personally I’d rather have some menu with a bunch of actions.

I’ll have a look at the possibility of making a script not sure if that’ll make it possible to hide it unless a folder is selected, thanks regardless for taking the time to look into it!
I personally like to have my context menu as empty as possible, which is why I was interested to see if it’s possible :slight_smile:

Fijne avond in ieder geval nog!