aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-11-11 18:29:27 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2024-11-11 18:29:27 +0300
commit7381a853a264ffdf8e3a9f58da465ca77fdacbb5 (patch)
tree29a7b6664bd9a40119dafa01cb858a51ea1ecd43
parentbc1b161f5c280d087c50fd1ec7a4221796cbb767 (diff)
downloadswayrice-niri.tar.gz
swayrice-niri.zip
setbg: primitively support niriniri
-rwxr-xr-xdotfiles/.local/bin/setbg11
1 files changed, 9 insertions, 2 deletions
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