2022-04-26 09:26:09 +02:00
|
|
|
#!/usr/bin/env bash
|
2022-04-28 11:27:39 +02:00
|
|
|
# Configuration of swayidle
|
2022-04-26 09:26:09 +02:00
|
|
|
# Just run the script
|
|
|
|
|
2022-04-28 11:27:39 +02:00
|
|
|
# Kill previous instances to avoid clashing
|
2022-04-26 09:26:09 +02:00
|
|
|
pkill swayidle
|
|
|
|
|
|
|
|
swayidle -w \
|
|
|
|
timeout 600 \
|
|
|
|
'swaymsg "output * dpms off"' \
|
|
|
|
resume 'swaymsg "output * dpms on"' \
|
|
|
|
timeout 1200 \
|
|
|
|
'systemctl suspend' \
|
2022-06-03 11:20:17 +02:00
|
|
|
before-sleep 'swaymsg "output * dpms on"; swaylock'
|
2022-04-28 11:27:39 +02:00
|
|
|
# Screen needs to be turned back on or you will get a black screen after waking up again.
|
2022-04-26 09:26:09 +02:00
|
|
|
|
2022-06-10 10:20:55 +02:00
|
|
|
# timeout 300 \
|
|
|
|
# "~/.scripts/wander.sh" \
|
|
|
|
# resume 'brightnessctl -r' \
|