Add 'lock' and 'before-sleep' options

This commit is contained in:
Andrew Scott 2023-07-14 01:04:28 -04:00
parent fb8a86f052
commit 1e345bd8ea
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -19,6 +19,8 @@ swayidle -w \
resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \ resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \
timeout 3600 'loginctl suspend-then-hibernate' \ timeout 3600 'loginctl suspend-then-hibernate' \
resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \ resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \
lock 'waylock-launcher' \
before-sleep 'waylock-launcher' \
2>&1 | tee -a "$LOG_FILE" & disown 2>&1 | tee -a "$LOG_FILE" & disown
{{- else if eq .chezmoi.hostname "hydrus" }} {{- else if eq .chezmoi.hostname "hydrus" }}
# lock: 5m, display: 15m # lock: 5m, display: 15m
@ -26,6 +28,8 @@ swayidle -w \
timeout 300 'waylock-launcher' \ timeout 300 'waylock-launcher' \
timeout 900 'wlr-randr --output DP-1 --off --output DP-2 --off' \ timeout 900 'wlr-randr --output DP-1 --off --output DP-2 --off' \
resume 'wlr-randr --output DP-1 --on --output DP-2 --on && sleep 2 && kanshictl reload' \ resume 'wlr-randr --output DP-1 --on --output DP-2 --on && sleep 2 && kanshictl reload' \
lock 'waylock-launcher' \
before-sleep 'waylock-launcher' \
2>&1 | tee -a "$LOG_FILE" & disown 2>&1 | tee -a "$LOG_FILE" & disown
{{- else }} {{- else }}
# lock after 5m # lock after 5m