files icon indicating copy to clipboard operation
files copied to clipboard

Support Desktop Actions

Open peteruithoven opened this issue 4 years ago • 3 comments

Problem

For elementary 6 onward there isn't a mechanism to adding Contracts as we could in 5.1 to work, mostly because of how apps are sandboxed by flatpak. This means for example my Resizer app can't add a Resize images option to the right click menu in Files. More examples.

Proposal

Quoting @davidmhewitt:

I believe the current plan is to work on expanding the XDG desktop file spec to allow Desktop Actions to take file/URI arguments. Then we don't need the contractor service at all, and it will be standards compliant to work on other DEs/distros.

Is this something Files can already support?

peteruithoven avatar Aug 10 '21 22:08 peteruithoven

Files does not currently consider Desktop Actions. The context menu for a file can initiate an action either through the mimetype ("Open in") options or through extra actions added via the Contractor plugin. If the Resizer app's desktop file's Exec key specifies that it can take a URL as a parameter and the Mimetype key includes image types then it should appear in the list of apps under "Open in" when you right-click on an image file.

Not sure how supporting Desktop Actions would work at the moment - I think Files would have to search through all available desktop files for applicable actions as I do not think there is currently a system database for these as there is for mimetype associations.

jeremypw avatar Aug 14 '21 11:08 jeremypw

Thanks for clarifying Jeremy. Should we close the issue and reopen when such a system database is created?

peteruithoven avatar Aug 21 '21 16:08 peteruithoven

I should leave it open as a wishlist item now unless a project leader marks it as "Will not Fix".

jeremypw avatar Aug 22 '21 08:08 jeremypw