Hello,
Nautilus used to once upon a way back time directly support custom emblems, folder colors, and going way-back, annotations. All this sort of info was, and still is, stored by gvfs. To see all the hidden goodies, "gio info ". There are lots of ways to skin this particular cat and gvfs is actually quite nice.
There is a “folder-colors” extension that allows setting both custom folder colors and a limited number of emblems. I use openSUSE, which ships it …
ox@orca$ zypper info nautilus-extension-folder-color
Loading repository data…
Reading installed packages…
Information for package nautilus-extension-folder-color:
Repository : Main Repository
Name : nautilus-extension-folder-color
Version : 0.0.88-bp154.2.20
Arch : noarch
Vendor : openSUSE
Installed Size : 54.0 KiB
Installed : Yes
Status : up-to-date
Source package : folder-color-0.0.88-bp154.2.20.src
Upstream URL : GitHub - costales/folder-color: Folder Color for Linux file browsers
Summary : Nautilus extension for changing directory color
Description :
A file browser extension for choosing the color of a folder.
I have hacked the “folder-color” code on my box so it allows me set a hand full of custom emblems. In short, everything you need to “tag” files in nautilus exists in gvfs. You could also use custom extended file attribuetes (as in with setfattr). xattrs are reported by gio. I use emblems & custom colors because those are both visible in nautilus and nemo (which has not been stripped of features). Thus I get a visual representation to the “tag”, which I like. I wrote a program that reads the values and writes them to extended attributes, thus I can restore the data to gvfs from a different login or machine, getting the same visual cues across multiple instances/installations of gnome and/or cinnamon. Thunar (xfce) will show custom emblems, but not custom colors.
ox@orca$ gio info -a xattr::custom-icon-name,metadata::custom-icon-name meek-icons
uri: file:///home/ox/meek-icons
local path: /home/ox/meek-icons
unix mount: /dev/mapper/cr_home /home ext4 rw,relatime,discard,stripe=32,data=ordered
attributes:
xattr::custom-icon-name: folder_color_orange
metadata::custom-icon-name: folder_color_orange
Depending on what kind of files you want to tag, different approaches may be in order.
My favorite option is to simply embed the metadata in the files and let tracker do the hard work. (Works GREAT! for video, audio, and photos). I believe tracker will also allow you to create custom tags, but I have not yet played with it.
Yeah! Lot’s of ways to skin this cat and one of my favorite topics …