Skip to content

Commit b29221f

Browse files
committed
fix: Fix wallpaper selector showing wrong wallpaper when filename contains dots
The `cut -d. -f1` command truncated filenames at the first dot, causing wallpapers named like "01. Catppuccin.jpg" to display as just "01" in the rofi menu. Multiple wallpapers with the same prefix showed identical labels, and selecting one applied the wrong file since `find -print -quit` returned the first alphabetical match. Changed to use full filename `$pic_name` (consistent with GIF and video handling on lines 87 and 94). The existing sed on line 222 correctly strips only the file extension for the find command.
1 parent ca0c23c commit b29221f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config/hypr/UserScripts/WallpaperSelect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ menu() {
9393
fi
9494
printf "%s\x00icon\x1f%s\n" "$pic_name" "$cache_preview_image"
9595
else
96-
printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path"
96+
printf "%s\x00icon\x1f%s\n" "$pic_name" "$pic_path"
9797
fi
9898
done
9999
}

0 commit comments

Comments
 (0)