Make the wallpaper-picker script accept all image file extensions, instead of only .png files.

This commit is contained in:
SeraphimeZelel
2025-11-05 13:11:41 +07:00
parent d8c428c576
commit 7324ac5028

View File

@@ -26,7 +26,8 @@ generate_menu(){
# Find all images and sort naturally # Find all images and sort naturally
while IFS= read -r img; do while IFS= read -r img; do
[[ -f "$img" ]] || continue [[ -f "$img" ]] || continue
thumb="$CACHE_DIR/$(basename "${img%.*}").png" ext="${img##*.}"
thumb="$CACHE_DIR/$(basename "${img%.*}").$ext"
# Generate thumbnail if missing or outdated # Generate thumbnail if missing or outdated
if [[ ! -f "$thumb" ]] || [[ "$img" -nt "$thumb" ]]; then if [[ ! -f "$thumb" ]] || [[ "$img" -nt "$thumb" ]]; then