wallpaper selector: progress indicator for thumbnail generation

This commit is contained in:
end-4
2025-08-30 22:10:29 +02:00
parent 021a49a72d
commit 19c321e7ae
6 changed files with 62 additions and 12 deletions
@@ -47,6 +47,12 @@ generate_thumbnail() {
local src="$1"
local abs_path
abs_path="$(realpath "$src")"
# Skip files with multiple frames (GIFs, videos, etc.)
case "${abs_path,,}" in
*.gif|*.mp4|*.webm|*.mkv|*.avi|*.mov)
return
;;
esac
local encoded_path
encoded_path="$(urlencode "$abs_path")"
local uri
@@ -58,7 +64,7 @@ generate_thumbnail() {
if [ -f "$out" ]; then
return
fi
magick "$abs_path" -resize ${THUMBNAIL_SIZE}x${THUMBNAIL_SIZE} "$out"
magick "$abs_path" -resize "${THUMBNAIL_SIZE}x${THUMBNAIL_SIZE}" "$out"
}
# Parse arguments