I need to find a way to tag files

Hey there!
I need help to find a way to tag files in Thunar.
The best thing would be to achieve something like MacOS tag system, which gives me, right-clicking on a file, the possibility to set a colored dot in front of the file, then in the file manager I can search for colors.
Now I actually don’t think that the exact same thing is possible in Thunar, but even just a way to assign a color, a symbol or something which is easily visible at first sight (so without the need to right-click or do anything) to a file would be nice for me.
Maybe I can achieve it with some custom action which let me toggle a symbol in front of the file name, but I’m not sure how. Do you have any idea?

If you don’t think that I can get something like this in Thunar, can you suggest me another file manager that could help me doing this? I need it to be XFCE compatible, so Dolphin wouldn’t be an option for me (I know that Dolphin could technically work on XFCE, but that would be a mess and I want to avoid it), I need it to be in GTK.

If you have any creative idea to help me, I would appreciate it very much! :slight_smile:

I just tried out nautilus, thunar, nemo, pantheon-files, and pcmanfm. It would seem that none of the major gtk file managers support this. Nemo seems to have a plugin system, so maybe if you learn more about that. It could prove fruitful?

Thank you. I’ll look into Nemo plugins but unfortunately I don’t think ther’s one that can do what I’m trying to achieve. It seems strange to me since it’s a very useful feature and I don’t think it would be too difficult to implement…maybe I’m the only one who would find it useful lol
If I recall correctly the Deepin file manager has this function, but that’s a lot of dependencies unfortunately, so…
I have seen that both Thunar and Nemo seems to have a similar option: emblems.
Only problem is that to access them I have to right-click, go to properties, emblems…not so immediate.
But maybe I could create a custom action that set a specific emblem, I don’t know…

I don’t think you are the only one. During my research I came across other people also looking for the future. From what I could find, nautilus use to have it, but it was one of the features that Gnome decided to remove.

Some threads I came across had people who were especially angry because even though none of the gtk file managers support this feature. The underlying technologies that these applications use mainly tracker and to some extent gvfs still support this and much more under the hood. It just isn’t exposed to the end user anymore. This is why thunar and nemo can support emblems at all. Although I did not manage to test whether or not you could search for an emblem, so I don’t know if it meets your other requirement of search.

Funny you should mention the deepin file manager because that is a QT application just like KDE’s Dolphin. I had a look at there repo https://github.com/linuxdeepin/dde-file-manager and you can see all of the QT dependencies. This wouldn’t be a problem for me since I am on KDE, but dolphin already has this.

You of course are trying to avoid this because you are on a GTK desktop. You would probably be pulling in half a desktop environment for this stuff. Anyways it was a fun rabbit hole to explore. I like to see what is going on behind the scenes.

Edit: Upon further research, I may be wrong about nautilus and tags. It may have been a thing during the Gnome 2 days, but I wasn’t around for that. However, during the early days of Gnome 3, there was a plugin for tags in nautilus. This eventually went away it seems.

2 Likes

Hello,

Even if a custom action is possible, you would have to do it file by file, there is wutag, but it’s only CLI.

The closest you can find is Double Commander which can colorize by filetypes.

https://doublecmd.github.io/doc/en/configuration.html#ConfigColorFiles

1 Like

I think I found a way!

gio set -t stringv "$HOME/Videos" metadata::emblems emblem-default seems to set the default emblem, and gio set -t unset "$HOME/Videos" metadata::emblems seems to remove it.

Now I think I could create a custom action in Thunar somehow and get it to work…what do you think?

Anyway @d-air1 thank you for your researches, I really appreciate it! you’re totally right about Deepin, I wasn’t thinking about installing it for the exact reason you mentioned. I was just noticing that somebody did it apparently :sweat_smile:
And thank you @vazicebon for wutag and Double Commander, they’re very useful!

If you could point me to a working way to create the custom action I would hugely appreciate it. I don’t know how to set it in order to add/remove the emblem(s) on the selected file(s)…

If you are going with emblems. Then nemo natively supports doing that. If it must be thunar, then the best I got is the xfce docs https://docs.xfce.org/xfce/thunar/custom-actions.

Thank you!

Sorry, it wasn’t nemo. It’s actually in thunar.

sure! I was thinking about toggle them by just right-clicking it, but I think I’ll find a way :slight_smile:

You mean like adding it in the context menu itself?

yep!

Ah, well in that case the custom action approach you were going for may be your best bet.

Sorry, I’m late to the party @loyak … Some time ago I created some scripts to manage color tags.

This is how they should look

Hope you find it useful.

NOTE: I haven’t checked it recently as I haven’t used XFCE for a while.