aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperAutoChange.sh4
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh4
2 files changed, 6 insertions, 2 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
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage