You are not logged in.
How can I force Thunar to regenerate thumbnails of a specific folder?
I tried Ctrl + R.
Last edited by Adcock (2021-02-06 15:12:21)
Offline
There is no built in function to regenerate thumbnails, but you can use a custom action to do this.
Note: tumbler creates a hash of the URI and saves the thumbnail file in ~/.cache/thumbnails/{normal,large}.
Here is a PoC script that can be used as a custom action (make sure you test the script on dummy data first):
#!/bin/bash
# thunar custom action
# command = /path/to/script %F
# appearance = select all
delete_thumbnail () {
hash=$(echo -n "file://$1" | md5sum | awk '{print $1}')
rm -f ~/.cache/thumbnails/{normal,large}/$hash.png
}
for i in $1
do
if [[ -d "$i" ]] # if its a directory
then # process all files
for f in "$i"/*
do
delete_thumbnail "$f"
done
else #its a file so just process it
delete_thumbnail "$i"
fi
done
exit 0Create a custom action, command is script plus %F (/path/to/script %F), and on the Appearance tab, check all boxes.
In thunar, you can select any combination of files and/or directories and it will run.
Offline
Thank you
This seems to work
But for my cursors it doesn't regenerate automatically
After running the script on cursors, I have to open those cursors in gimp and then press Ctrl+r
and that seems to regenerate.
I don't know what gimp does though.
But earlier Ctrl+r did not work but with the script it seems to work.
So thanks. ![]()
Offline
tumbler doesn't currently support xcursor thumbnails. Interesting that gimp can create something though. Not sure how that works.
Offline