blob: 7c42cda4cc604612c3101263db99aa2b69b5a120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
which swaylock grim pixelate > /dev/null ||
exit 1
umask 077
monitors="$(hyprctl monitors -j | jq -r '.[].name' | xargs)"
for monitor in $monitors
do
file="/tmp/locker-$monitor.png"
grim -l 0 -o "$monitor" "$file"
pixelate "$file" "$file" > /dev/null 2>&1
# Create image command for swaylock
img_opt="--image $monitor:$file $img_opt"
files="$files $file"
done
swaylock -f -u $img_opt
shred -uz -- $files
|