Fix wallpaper.sh

This commit is contained in:
bytequill 2025-07-15 18:14:48 +02:00
parent 0d7efc942f
commit 8e78ec129f
No known key found for this signature in database

View File

@ -28,7 +28,7 @@ if [[ ! -d "$DIR" ]]; then
exit 2
fi
FILE=$(find "$DIR" -type f | shuf -n1)
FILE=$(find "$DIR" -type f,l | shuf -n1)
if [[ -z "$FILE" ]]; then
echo "Error: No files found in '$DIR'." >&2
@ -42,7 +42,7 @@ hyprctl hyprpaper preload "$FILE"
echo "Info: Selecting wallpaper"
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
echo " Info: Selecting wallpaper for: '$monitor'"
hyprctl hyprpaper wallpaper "eDP-1,$MODE$FILE"
hyprctl hyprpaper wallpaper "$monitor,$MODE$FILE"
done
echo "Info: Unloading unused wallpapers"
hyprctl hyprpaper unload all