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

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

cp $1 "$HOME/.config/wall$mon.png"

IFS=$'\n'
outputcf=$(grep '^output .* background.*$' ~/.config/sway/$(uname -n))

for line in $outputcf; do
  swaymsg $line
done