config/sway/lock.sh

15 lines
303 B
Bash
Raw Normal View History

2023-07-25 03:26:05 +02:00
#!/bin/bash
LOCKARGS=""
for OUTPUT in `swaymsg -t get_outputs | jq -r '.[].name'`
do
IMAGE=/tmp/$OUTPUT-lock.png
grim -o $OUTPUT $IMAGE
convert $IMAGE -blur 2x8 $IMAGE
LOCKARGS="${LOCKARGS} --image ${OUTPUT}:${IMAGE}"
IMAGES="${IMAGES} ${IMAGE}"
done
swaylock $LOCKARGS
rm $IMAGES