From 3dd4d7b0eb2dc4fe5397e89c440f24988da93db3 Mon Sep 17 00:00:00 2001 From: Daniele Pintore Date: Thu, 8 May 2025 11:47:36 +0200 Subject: [PATCH] fix: random wallpaper only select from active ones --- .config/hypr/change_wallpaper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/hypr/change_wallpaper.sh b/.config/hypr/change_wallpaper.sh index 2c3d362..4402cc0 100755 --- a/.config/hypr/change_wallpaper.sh +++ b/.config/hypr/change_wallpaper.sh @@ -9,7 +9,7 @@ CURRENT_WALL=$(hyprctl hyprpaper listloaded) if [[ $1 == "random" ]];then # Get a random wallpaper that is not the current one - WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) + WALLPAPER=$(find "$WALLPAPER_DIR" -maxdepth 1 -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) else CHOICE=$(find $WALLPAPER_DIR -maxdepth 1 -type f -printf "%f\n" | sort | rofi -dmenu -p "Wallpaper: ") WALLPAPER="$WALLPAPER_DIR$CHOICE"