dotfiles/bin/swaylock-wrapper

18 lines
858 B
Plaintext
Raw Normal View History

2020-06-11 23:04:14 +02:00
#!/bin/bash
lock="swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color 451e75 --key-hl-color a01b83 --line-color 00000000 --inside-color 00000088 --separator-color 00000000"
lockt="exec ~/utils/bin/sway-locker -t"
revert() {
killall swayidle
swayidle -w timeout 3600 "$lock" \
timeout 3610 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep "$lockt"
}
trap revert HUP INT TERM
swayidle -w timeout 5 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color 451e75 --key-hl-color a01b83 --line-color 00000000 --inside-color 00000088 --separator-color 00000000
revert