aboutsummaryrefslogtreecommitdiff
path: root/pkgs/theme/myswaylock.sh
blob: 18d6a6f27dc8ca6f0b8228c58fc2a0befceefa9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
resolution="$(swaymsg -t get_outputs \
	| jq -r '.[0].rect | [.width,.height] | join("x")')"
case "$resolution" in
	1920x1080|2560x1440|2560x1600)
		;;
	*)
		resolution="1920x1080"
		;;
esac

exec swaylock -f \
	-n -c 000000 \
	-i "$(shuf -n1 -e "$BACKGROUND_LNXPCS"/*"$resolution.png")" \
	-s fill