I would like to build a bunch of little custom actions in Thunar, but I can't get to organise them properly since I don't know how to make 'child menus' (like that Create Document and in the screenshot below). Anyway, if I were to right-click somewhere empty in a folder in Thunar, a little menu pops up: https://i.stack.imgur.com/Auj6M.png It would be nice if I could add there something like: Create new: - Python script - bash script - ... git: - some_automated_process - another_automated_process - ... ...etc. I'm sure you can see what I mean. Since I could not find the way to do that, I decided to go with Templates (~/Templates), but for some reason Thunar is displaying some generic icon instead of (in this case) Python's icon (I'm referring to Script): https://i.stack.imgur.com/JAP2T.png so, can I have submenus?
As we have talked on #xfce-dev, in order to accomplish what you ask, thunar-custom-actions plugin needs to be updated to make use of ThunarxMenu to nest ThunarxMenuItems (not that hard). Also its dialog needs to somehow allow users to create/edit/move submenus, perhaps using GtkTreeView or a custom widget (this is the tricky part). It's not a simple feature, don't expect me on it soon, on the other hand, patches will be reviewed/merged ASAP.
*** Bug 12274 has been marked as a duplicate of this bug. ***
*** Bug 10850 has been marked as a duplicate of this bug. ***
*** Bug 1688 has been marked as a duplicate of this bug. ***
Link to old thunar-plugin which provided this functionallirty: https://goodies.xfce.org/projects/thunar-plugins/thunar-actions-plugin This issue is either about resurrection thunar-actions-plugin ( port to gtk3, support most recent thunarx, prettify ) Or adding the functionallity to the existing UCA plugin. Personally I would go rather for modifications in UCA, since IMO it's not good to have 2 plugins for almost the same purpose.
I'm not sure thunar-actions-plugin is in good shape, it targets thunarx-1, depends on thunar-vfs (superseded by gfvs a long time ago) and it's been 8 years since it was touched, for those reasons I asked to be archived. I also suspect it doesn't works, taking a quick look it seems the code is too short to accomplish what it advertises. And I agree, it's preferable to introduce its features in UCA than resurrect it.
There is the sendto plugin that does this. A simple copy of it, with another name for the submenu, and its own folder for custom actions(sendto uses ~/.local/share/Thunar/sendto/), and removal of default actions, imo it should be enough.
@mg979 not exactly. sendto-email plugin just installs a desktop file in <prefix>/share/Thunar that runs an executable (i.e. /usr/lib/Thunar/thunar-sendto-email). Thunar loads files from this folder and insert their entries in Send To context menu, it's hard coded and does not use the Thunar Extension Framework (thunarx) in any way. What you propose is similar but not as good as to what bug 14114 and bug 14024 ask IMHO. Still there's the question of how the user tells to Thunar to nest actions into submenus, what first comes to my mind is to update UCA's dialog as I explained in comment 1, but now that we're talking about actions into separated desktop files instead of uca.xml, using folders to nest desktop files and then create submenus based on those folder could be a simpler approach.
*** Bug 10803 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/thunar/-/issues/184. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev