aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperRandom.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-05-13 02:36:43 +0900
committerGitHub <noreply@github.com>2024-05-13 02:36:43 +0900
commit683e801de6ee2fe01513311e2bc13f695cd96486 (patch)
tree64df94cb64f5ba161761bfd64ae93658ca163f9c /config/hypr/UserScripts/WallpaperRandom.sh
parent35327b2814b228253464f0358f58c553ec98002b (diff)
parentea93a71cf6ac92041f00168e040cdc22882047b7 (diff)
Merge branch 'development' into main
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperRandom.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh
index 52fc819d..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,10 +19,10 @@ 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}/PywalSwww.sh
+${scriptsDir}/WallustSwww.sh
sleep 1
${scriptsDir}/Refresh.sh
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage