Adding icon to icon in Python on Windows / OSX / Linux

I'm trying to figure out how to add and change icon icons for individual files in the file system, just like Dropbox adds a sync icon to files. I want to do this on different platforms, and I want to see which language will be better. Right now, I think python is a candidate, but I am open to other languages ​​in which this problem can already be solved.

+5
source share
1 answer

I doubt that to achieve your goal there is a platform-agnostic library in any language. I

For GNOME (and probably XFCE), icon icons are called emblems and are managed using gvfs metadata. Here, how you can change the logo through the command line (taken from here ):

$ gvfs-set-attribute $FOLDER -t stringv metadata::emblems new urgent

I am sure that if you delve into the source of the gvfs-set attribute, you will understand the API.

For KDE 4.x, you can use kwriteconfig (taken from here ):

$ kwriteconfig --file "$FOLDER/.directory" --group 'Desktop Entry' --key Icon /path/to/icon.png

On Windows, you must implement the IShellIconOverlayIdentifier COM interface.

For MAC ... I don't know. According to this, there is no official API for this, at least for Mac OS X 10.6.

+5
source

All Articles