lock script, styling

This commit is contained in:
2025-10-28 15:37:56 +01:00
parent 57d5f6a51a
commit c8d8e3a7d7
4 changed files with 31 additions and 10 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
IMG_PATH="${XDG_RUNTIME_DIR:-/tmp}/lock.png"
exec swayidle -w \
timeout 30 "grim -t png \"$IMG_PATH\" && magick \"$IMG_PATH\" -blur 0x12 \"$IMG_PATH\" && swaylock -f -i \"$IMG_PATH\"" \
timeout 600 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' \
before-sleep "grim -t png \"$IMG_PATH\" && magick \"$IMG_PATH\" -blur 0x12 \"$IMG_PATH\" && swaylock -f -i \"$IMG_PATH\""