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 300 \
|
2022-04-28 11:27:39 +02:00
|
|
|
'brightnessctl -s -set 15%' \
|
2022-04-26 09:26:09 +02:00
|
|
|
resume 'brightnessctl -r' \
|
|
|
|
timeout 600 \
|
|
|
|
'swaymsg "output * dpms off"' \
|
|
|
|
resume 'swaymsg "output * dpms on"' \
|
|
|
|
timeout 1200 \
|
|
|
|
'systemctl suspend' \
|
2022-05-05 10:00:00 +02:00
|
|
|
before-sleep 'swaymsg "output * dpms on"; swaylock -f --screenshots --clock --indicator --effect-blur 5x5'
|
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
|
|
|
|