Fix wallselector
This commit is contained in:
parent
6a9da6709b
commit
b0b2f97625
@ -47,7 +47,7 @@ super + {h,u}
|
|||||||
ctrl + alt + {plus,minus,t}
|
ctrl + alt + {plus,minus,t}
|
||||||
picom-trans {-c -o +3,-c -o -1,-c -d}
|
picom-trans {-c -o +3,-c -o -1,-c -d}
|
||||||
|
|
||||||
# Random wallpaper
|
# Show Wallpaper Selector
|
||||||
super + alt + w
|
super + alt + w
|
||||||
wallselector
|
wallselector
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ elif ! command -v convert > /dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Set some variables
|
# Set some variables
|
||||||
wall_dir="$(xdg-user-dir PICTURES)wallpapers"
|
wall_dir="$(xdg-user-dir PICTURES)/wallpapers"
|
||||||
cacheDir="${HOME}/.cache/wallselector"
|
cacheDir="${HOME}/.cache/wallselector"
|
||||||
rofi_command="rofi -dmenu -theme ${HOME}/.config/rofi/wallselector.rasi -theme-str ${rofi_override}"
|
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
|
# Convert images in directory and save to cache dir
|
||||||
for image in "$wall_dir"/*.{jpg,jpeg,png,webp}; do
|
for image in "$wall_dir"/*.{jpg,jpeg,png,webp}; do
|
||||||
if [ -f "$image" ]; then
|
if [ -f "$image" ]; then
|
||||||
nombre_archivo=$(basename "$image")
|
file_name=$(basename "$image")
|
||||||
if [ ! -f "${cacheDir}/${file-name}" ] ; then
|
if [ ! -f "${cacheDir}/${file_name}" ] ; then
|
||||||
convert -strip "$image" -thumbnail 500x500^ -gravity center -extent 500x500 "${cacheDir}/${file-name}"
|
convert -strip "$image" -thumbnail 500x500^ -gravity center -extent 500x500 "${cacheDir}/${file_name}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user