summaryrefslogtreecommitdiff
path: root/x11-themes/background-lnxpcs/files/swaybackground
blob: 0bc42beaee03356bab76325a44e59e7b5c678fc3 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
BACKS="/usr/share/backgrounds"

if [ -n "$WAYLAND_DISPLAY" ]; then
	swaymsg output '*' background "$(find "$BACKS" -type f | shuf -n 1)" fill
else
	find "/run/user/$(id -u)/" -name "sway-ipc*" \
		-exec swaymsg -s {} "exec $0" +
fi