aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperAutoChange.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2024-05-09 13:50:51 +0900
committerJaKooLit <jimmielovejay@gmail.com>2024-05-09 13:50:51 +0900
commit39ba3c402f2e86c3d7296fe6925f1bd896d0959e (patch)
tree1c55ab0a52e5d4b9bd647b29923598aeb6edffa0 /config/hypr/UserScripts/WallpaperAutoChange.sh
parent25cbdc6a01177a5da063458438cc9ea10271ec9f (diff)
Wallpaper Select and Auto wallpaper change Script updated to be able to set wallpaper on focused monitor only. NOTE: you need awk
Diffstat (limited to 'config/hypr/UserScripts/WallpaperAutoChange.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperAutoChange.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/hypr/UserScripts/WallpaperAutoChange.sh b/config/hypr/UserScripts/WallpaperAutoChange.sh
index e52b7e90..9e0e1cbe 100755
--- a/config/hypr/UserScripts/WallpaperAutoChange.sh
+++ b/config/hypr/UserScripts/WallpaperAutoChange.sh
@@ -9,6 +9,8 @@
pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh
+focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
+
if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then
echo "Usage:
$0 <dir containing images>"
@@ -29,7 +31,7 @@ while true; do
done \
| sort -n | cut -d':' -f2- \
| while read -r img; do
- swww img "$img"
+ swww img -o $focused_monitor "$img"
$pywal_refresh
sleep $INTERVAL
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage