aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/setbg
blob: 2e6dfba32b73321c2c5106a48aa8bdd5ed80b636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

mon="1"
[ -n "$2" ] && mon="$2"

dest="$HOME/.config/wall$mon.png"

cp "$1" "$dest"

if [ -n "$SWAYSOCK" ]; then
	updisplay
elif [ -n "$NIRI_SOCKET" ]; then
	killall swaybg
	setsid swaybg -i "$dest" -m fill&
fi