sisyphus/scripts/idle.sh
2022-06-02 18:10:59 +02:00

19 lines
596 B
Bash
Executable file

#!/usr/bin/env bash
# Configuration of swayidle
# Just run the script
# Kill previous instances to avoid clashing
pkill swayidle
swayidle -w \
timeout 300 \
"~/.scripts/wander.sh" \
resume "~/.scripts/wander.sh" \
timeout 600 \
'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout 1200 \
'systemctl suspend' \
before-sleep 'swaymsg "output * dpms on"; swaylock -f --screenshots --clock --indicator --effect-blur 5x5'
# Screen needs to be turned back on or you will get a black screen after waking up again.