From 7381a853a264ffdf8e3a9f58da465ca77fdacbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Mon, 11 Nov 2024 18:29:27 +0300 Subject: setbg: primitively support niri --- dotfiles/.local/bin/setbg | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'dotfiles/.local') diff --git a/dotfiles/.local/bin/setbg b/dotfiles/.local/bin/setbg index 9daca99..2e6dfba 100755 --- a/dotfiles/.local/bin/setbg +++ b/dotfiles/.local/bin/setbg @@ -3,6 +3,13 @@ mon="1" [ -n "$2" ] && mon="$2" -cp $1 "$HOME/.config/wall$mon.png" +dest="$HOME/.config/wall$mon.png" -updisplay +cp "$1" "$dest" + +if [ -n "$SWAYSOCK" ]; then + updisplay +elif [ -n "$NIRI_SOCKET" ]; then + killall swaybg + setsid swaybg -i "$dest" -m fill& +fi -- cgit v1.2.3