diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-02-19 13:27:11 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-02-19 13:27:11 +0900 |
| commit | 239e30d295bf7a58e2ac00a79d959704b3ba8fe1 (patch) | |
| tree | d98b8d0838d6fd0332622911ac31292477848699 /config/hypr/UserScripts/WallpaperRandom.sh | |
| parent | 6545cbd6f3cc7620f53e5872e018ea8c0b91d9d8 (diff) | |
added a function to check first if kitty installed. This is a idiot notification who uninstall kitty and complain that script wont work
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperRandom.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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[@]} ]} |
