Hello, I have done this before. But I am not satisfied with the result.
When you delete this file and create it with the same name and extension, the picture is not assigned back.
The guy above advised to look into Icons - ArchWiki:
That’s what I did yesterday. As I was reading yesterday, I realized that each extension has its own MIME type registered with the system. And through this MIME-type each file extension is assigned its own icon.
Today I’m going to ask the question in a slightly different wording. I think there will be people who will answer it.
The guy below suggested that I was interested in MIME types of file extensions. And gave a link to Icons - ArchWiki.
I started reading “Icons - ArchWiki” and after a while got to MIME-types specification. I continued to read the MIME-types specification and when I got to the section “The icon files” I tried to register a new file MIME-type with extension .scss in directory ~/.local/share/mime/packages and then I ran the command:
but it didn’t make a difference.
I still don’t understand how to specify a link to the icon in the xml file, so that when the system detects that this ( name_file.scss ) file has the extension .scss, what would it refer to the corresponding file with the MIME type and it already gave the icon to the file with the .scss extension.
I don’t understand exactly how the whole mechanism works, described as I understand it now. I hope, that some people will help me to understand MIME file types.
I’m waiting for developers, if available and if they can suggest something. Or just at least explain the scheme of how the whole thing works.
I am waiting for anyone with good advice on the subject!
P.S. and yes if you ever do something like this, be sure to take pictures via timeshift or any other program to create system restore files. During these two days I screwed up a lot and timeshift helped me out more than three times.
maybe you would want to share what you tried, instead of just saying it did not work.
I was always under the impression file types were deducted from the file magic, not the extension, and this was a reason why windows style fake .extension “viruses” did not spread on linux. But by the links you posted with a quick look it seems also extensions can be defined to look some way… ?!
Hey guys. I kind of solved the issue by installing a different icon theme. But still I will dig further, how to do it on the previous icon theme
Good luck everyone! Thank you for your feedback, thanks to some of you I have broadened my horizons. Thanks.
To append a custom icon to an existing icon theme xdg-icon-resource can be used. This will resize and copy the icon to $HOME/.local/share/icons/. With this method, custom emblems can also be added. Examples:
$ xdg-icon-resource install --size 128 --context emblems archuser-example.png # add as emblem
$ xdg-icon-resource install --size 128 archuser-example.png # add as normal icon