diff options
Diffstat (limited to 'bin/guiscripts/locker')
| -rwxr-xr-x | bin/guiscripts/locker | 23 | 
1 files changed, 18 insertions, 5 deletions
diff --git a/bin/guiscripts/locker b/bin/guiscripts/locker index f464617..c35f6d4 100755 --- a/bin/guiscripts/locker +++ b/bin/guiscripts/locker @@ -2,8 +2,21 @@  which swaylock grim pixelate > /dev/null ||  	exit 1  umask 077 -file=/tmp/bg.png -grim -l 0 - > $file -pixelate $file $file -swaylock -u -i $file -shred -uz $file + +monitors="$(hyprctl monitors -j | +	jq -r '.[].name' | +	tr '\n' ' ' | +	sed 's,.$,,')" + +for monitor in $monitors +do +	file="/tmp/locker-$monitor.png" +	grim -l 0 -o "$monitor" "$file" +	pixelate "$file" "$file" +	# Create image command for swaylock +	icmd="$icmd --image $monitor:$file" +	files="$files $file" +done + +swaylock -f -u $icmd +shred -uz -- $files  | 
