Page 1 of 6

create folders with an icon

Posted: Mon Oct 07, 2024 2:02 pm
by Jerry3904
Recent posts here and in our Facebook group got me thinking about this topic. I like to keep scripts in a dedicated folder and would like to come up with a icon-folder instead of a plain-Jane [=Americanism from 1912] one. More generally, it might be nice if we could make this easy for users to do who have other icons in mind (dogs, movies, etc.).

The basic steps seem clear enough:

--find the basic (Papirus?) folder icon in the required size
--find/create an icon to put on it (my choice is attached)
--add the desired icon to the basic folder icon
--(optional) save the new folder where it can be found by others

I can probably futz around for a week to try to do this, but thought I would first see what people who really know about this stuff might suggest.

Re: create folders with an icon

Posted: Mon Oct 07, 2024 2:17 pm
by dolphin_oracle
the trick isn't making an icon. its getting a folder to use it.

the easiest way is add a jpg called "folder.jpg" to the folder in question. any jpeg will work. its the same feature that is used to generate album art icons (typically cover.jpg).

thunar requies a thumbnailer to generate the the thumbnail that is added to cache. tumbler would be xfce's default. other file managers might not need a separate thumbnailer.
Image

Re: create folders with an icon

Posted: Mon Oct 07, 2024 2:57 pm
by Jerry3904
That's a good start, thanks.

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:02 pm
by siamhie
Kind of like what I did with my .fluxbox folder? (I'm using Thunar)

folder_icon.png

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:07 pm
by Jerry3904
Not what I was thinking of, but really nice! I'm looking in my case to have folders that match the default ones for Downloads, Documents, etc. with their small icon and color.

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:25 pm
by AVLinux
Hi,

Interesting discussion! How does this differ from using folder Emblems? If I have a dedicated shared folder or a folder for executables I often use an Emblem..
shot-2024-10-07_15-29-03.jpg

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:36 pm
by Jerry3904
It's just a different approach, and also very nice. I'm looking for a result that matches the ones we currently use by default (exx attached, on orange folders).

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:42 pm
by BV206
I tried to change the icons of folders last year and gave up because I couldn't make it work the way I want.
viewtopic.php?t=77936

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:46 pm
by AVLinux
Ahhh, I see, understood!

Another approach to get the folders looking like the other XDG folders although much deeper in system-mojo is that I believe you can extend folder types in ~/.config/user-dirs.dirs. I would imagine this must require adding these new folder types to your selected Icon theme as well, so not impossible but pretty involved. Probably being good with SVG/Inkscape and then never changing your modified Icon theme would be a must... :frown:

Code: Select all

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Re: create folders with an icon

Posted: Mon Oct 07, 2024 3:55 pm
by BV206
AVLinux wrote: Mon Oct 07, 2024 3:46 pm I believe you can extend folder types in ~/.config/user-dirs.dirs.
You can't. I tried that back when I tried to make a "Favorites" function.
If you add more folders to ~/.config/user-dirs.dirs they are ignored.
The XDG spec only recognizes Desktop, Documents, Downloads, Music, Pictures, Public, Templates, and Videos. All you can do is change the locations of those folders. I couldn't find a way around that or anybody that added other folders.