sway use systemctl for services

This commit is contained in:
Henrik Bakken
2025-05-15 21:41:12 +02:00
parent 596ee2965f
commit 5ef73f12a3
2 changed files with 42 additions and 13 deletions
+33
View File
@@ -0,0 +1,33 @@
---
debug: true
wait: false
timeouts:
# idle_timeout
- timeout: 240
command: brightnessctl -s && brightnessctl set 10
resume: brightnessctl -r
# locking_timeout
- timeout: 1200
command: swaymsg exec \$locking
# keyboard_timeout
- timeout: 1200
command: /usr/share/sway/scripts/keyboard-backlight-switch.sh off
resume: /usr/share/sway/scripts/keyboard-backlight-switch.sh on
# screen_timeout
- timeout: 2400
command: swaymsg "output * power off"
resume: swaymsg "output * power on"
# dpms_timeout
- timeout: 2400
command: swaymsg "output * dpms off"
resume: swaymsg "output * dpms on"
# sleep_timeout_bat
# - timeout: 900
# command: acpi --ac-adapter | grep -v 'on-line' && systemctl sleep
# sleep_timeout_ac
# - timeout: 3600
# command: acpi --ac-adapter | grep 'on-line' && systemctl sleep
before-sleep: swaymsg exec \$locking
after-resume: swaymsg "output * dpms on"
lock: swaymsg exec \$locking
idlehint: '240'