From 239e30d295bf7a58e2ac00a79d959704b3ba8fe1 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 19 Feb 2025 13:27:11 +0900 Subject: added a function to check first if kitty installed. This is a idiot notification who uninstall kitty and complain that script wont work --- config/hypr/UserScripts/WallpaperRandom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/hypr/UserScripts/WallpaperRandom.sh') diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh index abaa9b03..79396508 100755 --- a/config/hypr/UserScripts/WallpaperRandom.sh +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -5,7 +5,7 @@ wallDIR="$HOME/Pictures/wallpapers" SCRIPTSDIR="$HOME/.config/hypr/scripts" -focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') +focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') PICS=($(find -L ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \))) RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} -- cgit v1.2.3