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
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'
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