diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2024-05-12 19:38:06 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2024-05-12 19:38:06 +0900 |
| commit | 27285b10c8b9cd90a945ef7167d4c6d93daf5e3e (patch) | |
| tree | 0bd02b4086a72cf210836476a6bf07c53f3b9cae /config/hypr/UserScripts | |
| parent | c25741678cfa136d5fb7e9b4a43020bdcab0937d (diff) | |
wallpaperRamdom will only change focused monitor
Diffstat (limited to 'config/hypr/UserScripts')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperRandom.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh index adaec3b5..050c10c3 100755 --- a/config/hypr/UserScripts/WallpaperRandom.sh +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -5,6 +5,8 @@ wallDIR="$HOME/Pictures/wallpapers" scriptsDir="$HOME/.config/hypr/scripts" +focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') + PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \))) RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} @@ -17,7 +19,7 @@ BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER" -swww query || swww-daemon --format xrgb && swww img ${RANDOMPICS} $SWWW_PARAMS +swww query || swww-daemon --format xrgb && swww img -o $focused_monitor ${RANDOMPICS} $SWWW_PARAMS ${scriptsDir}/WallustSwww.sh |
