config/sway/lock.sh
2023-07-25 03:26:05 +02:00

15 lines
303 B
Bash
Executable File

#!/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