aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperRandom.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2024-05-12 19:38:06 +0900
committerJaKooLit <jimmielovejay@gmail.com>2024-05-12 19:38:06 +0900
commit27285b10c8b9cd90a945ef7167d4c6d93daf5e3e (patch)
tree0bd02b4086a72cf210836476a6bf07c53f3b9cae /config/hypr/UserScripts/WallpaperRandom.sh
parentc25741678cfa136d5fb7e9b4a43020bdcab0937d (diff)
wallpaperRamdom will only change focused monitor
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperRandom.sh4
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage