diff options
| author | Martin Guzman <55927935+brockar@users.noreply.github.com> | 2025-02-19 01:59:09 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 01:59:09 -0300 |
| commit | d9e50a7a5a80028aabe07570c3432a98c22fc92b (patch) | |
| tree | 928479da301647565d3de66174aaaaaf4719d513 /config/hypr/UserScripts/WallpaperRandom.sh | |
| parent | aafa54509ccaee47a851011dc56996b29892eda4 (diff) | |
| parent | 50d1dd1508c398ae19a93c8d621f3e7f6d81603b (diff) | |
Merge branch 'JaKooLit:main' into main
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[@]} ]} |
