Fix wallselector

This commit is contained in:
edwark43 2023-12-27 19:12:30 +00:00
parent 6a9da6709b
commit b0b2f97625
2 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@ super + {h,u}
ctrl + alt + {plus,minus,t}
picom-trans {-c -o +3,-c -o -1,-c -d}
# Random wallpaper
# Show Wallpaper Selector
super + alt + w
wallselector

View File

@ -11,7 +11,7 @@ elif ! command -v convert > /dev/null 2>&1; then
fi
# Set some variables
wall_dir="$(xdg-user-dir PICTURES)wallpapers"
wall_dir="$(xdg-user-dir PICTURES)/wallpapers"
cacheDir="${HOME}/.cache/wallselector"
rofi_command="rofi -dmenu -theme ${HOME}/.config/rofi/wallselector.rasi -theme-str ${rofi_override}"
@ -28,9 +28,9 @@ if [ ! -d "${cacheDir}" ] ; then
# Convert images in directory and save to cache dir
for image in "$wall_dir"/*.{jpg,jpeg,png,webp}; do
if [ -f "$image" ]; then
nombre_archivo=$(basename "$image")
if [ ! -f "${cacheDir}/${file-name}" ] ; then
convert -strip "$image" -thumbnail 500x500^ -gravity center -extent 500x500 "${cacheDir}/${file-name}"
file_name=$(basename "$image")
if [ ! -f "${cacheDir}/${file_name}" ] ; then
convert -strip "$image" -thumbnail 500x500^ -gravity center -extent 500x500 "${cacheDir}/${file_name}"
fi
fi
done