From 39ba3c402f2e86c3d7296fe6925f1bd896d0959e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 13:50:51 +0900 Subject: Wallpaper Select and Auto wallpaper change Script updated to be able to set wallpaper on focused monitor only. NOTE: you need awk --- config/hypr/UserScripts/WallpaperSelect.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config/hypr/UserScripts/WallpaperSelect.sh') diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index de9c6546..2616014d 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -4,6 +4,8 @@ SCRIPTSDIR="$HOME/.config/hypr/scripts" +focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') + # WALLPAPERS PATH wallDIR="$HOME/Pictures/wallpapers" @@ -67,7 +69,7 @@ main() { done if [[ $pic_index -ne -1 ]]; then - swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS + swww img -o $focused_monitor "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS else echo "Image not found." exit 1 -- cgit v1.2.3