diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-02-19 13:37:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 13:37:56 +0900 |
| commit | c1baf9223d7a5eac55c4cb466a087d0c15b291e1 (patch) | |
| tree | d98b8d0838d6fd0332622911ac31292477848699 /config/hypr/UserScripts/WallpaperRandom.sh | |
| parent | 259be5801f64ddcec5bdc7d97512322079c57314 (diff) | |
| parent | 50d1dd1508c398ae19a93c8d621f3e7f6d81603b (diff) | |
Merge pull request #564 from JaKooLit/main
added a function to check first if kitty installed. This is a idiot n…
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[@]} ]} |
