summaryrefslogtreecommitdiffstats
path: root/.local/bin/setbg
blob: 87096a60d5b4706558fd45110610fd44dcbaf673 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# In LARBS, ~/.config/wall.png is the location of the system wallpaper.  This
# script, if given an argument, moves it there.  This script without an
# argument sets ~/.config/wall.png as the wallpaper, which is required on login
# if you don't want a black screen.

[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."

# If pywal is installed, use it.
type wal >/dev/null 2>&1 && { wal -c ;
	wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun;
	xsetroot -name "fsignal:xrdb";
	killall dwmblocks;
	setsid dwmblocks >/dev/null 2>&1 & }

xwallpaper --zoom ~/.config/wall.png