bassmanitram / actions-for-nautilus

An extension to the Gnome "Files" file manager that allows you to add arbitrary actions to the file selection context menu.
Apache License 2.0
165 stars 16 forks source link

How to add icons to specific new commands? #28

Open hamad12a opened 1 year ago

hamad12a commented 1 year ago

I commonly use this extension for VS Code; it would be better if I see the editor's icon in the context menu.

bassmanitram commented 1 year ago

Firstly thanks for using this and for this suggestion. I have been thinking about this myself and will put it on the roadmap as a priority item. I'll report progress via this issue.

bassmanitram commented 1 year ago

Unfortunately, it APPEARS that while icon is an allowable argument to the Nautilus.MenuItem constructor and an accessible property of the resulting instance, it is currently ignored. This nautilus-python issue, while created 3 years ago, appears to confirm that in a comment by the maintainer from only two months ago. See the source link that Jan provides in his comment.

On looking at a full context menu in Nautilus I note that there are no icons displayed even for entries not associated with A4N. Can you confirm that in your installation? If you do see non-A4N icons, what version of Nautilus are you using?

hamad12a commented 1 year ago

GNOME nautilus 42.2 I do see VS Code icon in the context menu for the files; after setting VS Code mime-types for json, plain-text, cpp, etc., however, the context menu of the folders does not show open in VS Code; any directory is type inode/directory but Nautilus does not allow associating for folders a default application such as VS Code (if not tell correct me). That's why I came here

hamad12a commented 1 year ago

It might be necessary to hack the source code of Nautilus and build it from scratch

bassmanitram commented 1 year ago

Um - yeah - knock yourself out :D