How to change the icons for all my hidden folder

Style your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Luttim
Level 1
Level 1
Posts: 47
Joined: Fri Dec 10, 2021 5:58 am

How to change the icons for all my hidden folder

Post by Luttim »

I would like my hidden folders to have a different appearance to my other folders. When i navigate to .icons/theme/places/scalable I see no filename for folder-hidden. So I create one and reload my theme in settings, but it does not change the appearance of my hidden folders. Is there a way to change the appearance of all hidden folders in the icon theme?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: folder-hidden

Post by sebastjava »

Hmm. I don't know how to do this. But i have an alternate cheap idea. You could just add an emblem to every hidden folder.

I tried to select all my hidden folders in Nemo to go to File > Properties > Emblems... But this doesn't work. You can only add emblems to files by selecting them one-by-one. It would have been so easy. Too bad, i searched for some command to do this and found that: viewtopic.php?t=308032

I modified these commands for bulk work this way:

TO DO:

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t stringv "$folder" metadata::emblems emblem-system
done
Reload Nemo to see the results: Ctrl+R

TO UNDO:

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t unset "$folder" metadata::emblems
done
Reload Nemo to see the results: Ctrl+R

I tested this with the emblem-system but you can replace this with your preferred one. Just select one file and go to File > Properties > Emblems to see them all. Add the "emblem-" prefix and use lowercase letters only. Examples: emblem-default, emblem-important, etc.
Last edited by sebastjava on Tue May 24, 2022 9:25 pm, edited 2 times in total.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: folder-hidden

Post by sebastjava »

That was just a quick and cheap alternate answer but i think you could also use this same gio command to change the icons to folder-hidden, getting exactly what you were asking in the first place. But i don't know how to do this exactly. You would need to do some more web search... Try my first quick answer first, and see if this fits. I have also included a quick "undo" anyway...

Of course, you would also have to create this custom folder-hidden icons before, but you said you already have done that.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: folder-hidden

Post by smurphos »

sebastjava wrote: Tue May 24, 2022 3:54 pm That was just a quick and cheap alternate answer but i think you could also use this same gio command to change the icons to folder-hidden, getting exactly what you were asking in the first place. But i don't know how to do this exactly.
If this folder-hidden isn't in the current icon theme or it's inherits (replace /path/to/ with the actual path)

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t stringv "$folder" metadata::custom-icon "file:///path/to/folder-hidden"
done
or if it is in the current icon theme or it's inherits

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t stringv "$folder" metadata::custom-icon-name folder-hidden
done
Last edited by smurphos on Thu May 26, 2022 1:04 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: How to change the icons for all my hidden folders

Post by sebastjava »

You may want to start with a simple GUI test on a single folder before executing this for loop...

DO:
  1. Press Ctrl-H to toggle between show/hide hidden files and folders
  2. Select a single hidden folder such as ~/.config
  3. Open File > Properties
  4. Click on the icon in this dialog box
  5. Select your custom icon
UNDO:
  1. Select a single hidden folder such as ~/.config
  2. Open File > Properties
  3. Click on the icon in this dialog box
  4. Click on the Revert button
P.S.: I suggest you change your OP title to some more descriptive title such as "How to change the icons for all my hidden folders", or something better.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 708
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: How to change the icons for all my hidden folder

Post by sebastjava »

I checked all this again. I typed commands such as gio help, gio help set, and, much more interesting, man gio. In man gio i looked at the set sub-command section.

Then i did some tests on my ~/.cache folder, using both the GUI methods and the command-line gio methods, looking at the results on gio info $HOME/.cache for each test i did.

So, i just wanted to add two more things here...

PRIMO: All these are standard methods

I can confirm the methods described here above by smurphos for custom-icon or custom-icon-name are the exact equivalent as the "standard" GUI method described on my latest post here above. (viewtopic.php?p=2180223#p2180223 compared to viewtopic.php?p=2180464#p2180464)

With just one big difference: the command-line method lets you change all your hidden folder icons all at once, in just a split second, instead of doing them one-by-one with the GUI. As said before.

SECUNDO: You can always UNDO if needed

You probably have already figured this out from these previous posts, but, just in case, here are the "undo" methods. Use one of these two groups, depending on what you did before.

To undo all custom-icon :

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t unset "$folder" metadata::custom-icon
done
Reload Nemo to see the results: Ctrl+R

—OR—

To undo all custom-icon-name :

Code: Select all

for folder in $HOME/.??*/
do
  gio set -t unset "$folder" metadata::custom-icon-name
done
Reload Nemo to see the results: Ctrl+R

CONCLUSION

Feel free to try whatever methods listed above, as they are all "standard" methods, and there is always a quick and easy "undo" for all of them anyway...
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
Luttim
Level 1
Level 1
Posts: 47
Joined: Fri Dec 10, 2021 5:58 am

Re: How to change the icons for all my hidden folder

Post by Luttim »

All helpful, thanks very much. I was hoping there might be a way to do it within the actual icon theme and am a little surprised there isn't. On a side note I notice dolphin file browser makes hidden folders a lighter shade - it's a nice touch.
Locked

Return to “Themes, Icons & Wallpaper”