Page 5 of 6
Re: create folders with an icon [Solved]
Posted: Wed Oct 09, 2024 10:21 am
by Melber
Hooray, finally got it to work for me in MXFB.
Based on the xfce docs page here
https://docs.xfce.org/xfce/tumbler/avai ... or_folders
and this xfce forum thread
https://forum.xfce.org/viewtopic.php?id=17051
I created the files ~/.local/share/thumbnailers/folder.thumbnailer and ~/bin/folder-thumbnailer with the relevant contents and edits.
I also needed to change the sh to bash in the .thumbnailer file.
Made a folder, copied over the Papirus icon folder-yellow-code.svg, renamed it to folder.svg and ta da
quickshot_241009_160942.png
For info, here are the edited files
~/.local/share/thumbnailers/folder.thumbnailer
Code: Select all
[Thumbnailer Entry]
Version=1.0
Encoding=UTF-8
Type=X-Thumbnailer
Name=Folder Thumbnailer
MimeType=inode/directory;
Exec=bash -c '~/bin/folder-thumbnailer %s %i %o %u'
~/bin/folder-thumbnailer
Code: Select all
#!/bin/bash
covers=("$2"/{.,}{folder,cover}.{jpg,png,svg})
for f in "${covers[@]}"; do
[ -f "$f" ] && {
cover=$f
break
}
done
if [ -z "$cover" ] || ! convert -background none -thumbnail "$1" "$cover" "$3"; then
gdbus call --session --dest=org.freedesktop.thumbnails.Cache1 --object-path /org/freedesktop/thumbnails/Cache1 \
--method org.freedesktop.thumbnails.Cache1.Delete "['$4']" >/dev/null
fi
Re: create folders with an icon
Posted: Wed Oct 09, 2024 11:02 am
by Melber
btw
@Jerry3904 , this sort of what you're looking for?
folder-deeporange-code
Screenshot_20241009-165753.png
++edit to add++
icon is in the standard Papirus set. I took the 64x64 version
Re: create folders with an icon
Posted: Wed Oct 09, 2024 11:09 am
by Jerry3904
Well, lookee there! Well done. Will try to replicate this for my system on the weekend.
I had no idea what a hornet's nest I was whacking with this topic.

Re: create folders with an icon
Posted: Wed Oct 09, 2024 11:21 am
by Aronticuz
Some interesting features from years ago:
When using transparency, cut outs and folder contents.
Often folder contents were shown automatically and that could be used to a design advantage by placing a file in the folder with first character as a dot (full stop) so it would not appear in a directory listing
(Every file must have had its own image)
When images of contents appears they followed an increasing order on file name.
To design an intended first page that would always appear I used filenames such as .000000 (extension if needed)
Aim achieved: to have unique personalized designs using varying levels of transparencies and cot out shapes partially showing contents on a filename sorted on alphanumeric increasing order AND a means to keep an appropriate image in the first file position.
So on a Mac for example your chosen design be the first one to pop out off the folder on animation effects
I don't think it slowed down the Mac much at all really - not noticeably anyway.
Short summary: so a folder of your own design could be made useful AND a first item in that folder could be made to pop up if the folder had animation effects.
Result: animated folder with predictable first object in that folder
Re: create folders with an icon
Posted: Wed Oct 09, 2024 4:20 pm
by i_ri
Hello Jerry3904 and Everyone
The word directory. Is it allowed to use the word directory in a file name? Does it strike as odd, use of the word folder in the file names folder thumb..s?
Re: create folders with an icon
Posted: Wed Oct 09, 2024 4:32 pm
by Aronticuz
As a follow on from my earlier post... making one fixed hidden file that "appeared" in an animation was a lot better than several fixed files.
Mostly because a set of fixed animated files took something away of transient relevance once those file contents were changed.
In short: it just turned yo another version of same old of the same old
Re: create folders with an icon
Posted: Wed Oct 09, 2024 7:04 pm
by AVLinux
Thank you
@Melber !!
Your scripts also worked for me with Thunar/tumbler on Enlightenment! The "PROGRAMS" folder was previously an emblem and is now using the folder.svg hack.
shot-2024-10-09_19-00-55.jpg
Re: create folders with an icon
Posted: Thu Oct 10, 2024 4:36 am
by i_ri
Hello Jerry3904 and everyone
As follow-up on the mention of the systemd only respin Those did folder thumbnailing after install package <librsvg2-bin>
First time booting
live made persistent MX 23.4mxfluxbox 64
installed package <desktop-defaults-mx-xfce-system> and reboot.
The folder thumbnailing is working.
In /usr/bin/folder-thumbnailer
Can add any name to designate as the
folder directory thumbnailer png icon reference.

in /.fluxbox that is an xpm a svg a png and a png
Re: create folders with an icon
Posted: Thu Oct 10, 2024 4:52 am
by Melber
i_ri wrote: Thu Oct 10, 2024 4:36 am
...In /usr/bin/folder-thumbnailer ...
aha, that's maybe the difference.
The script seems to be part of the default xfce install but is not included in the default mxfb install.
Re: create folders with an icon
Posted: Thu Oct 10, 2024 11:11 pm
by AVLinux
For what it's worth I put @Melber scripts system-wide in /usr/share/thumbnailers and /usr/local/bin and they work as expected as long as you correctly point to where you've placed the folder-thumbnailer script. So if you don't want to necessarily install several other unwanted XFCE4 default items in Fluxbox or other non-XFCE4 DE's it would be pretty easy to make a small Deb to install Melber's assets system-wide.