commit 1f14162476dd37bd5ea925b330050d4205fc65cb
parent b70c82a5621ff29d43754c4be641eafd36614714
Author: Chris Bracken <chris@bracken.jp>
Date: Mon, 12 Jan 2026 22:11:03 +0900
sway: power off screen when idle
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.config/sway/config b/.config/sway/config
@@ -44,7 +44,8 @@ set $menu wofi --show run
set $lock_screen swaylock -f -c 000000
# Set the suspend command.
-set $suspend_system systemctl suspend
+set $suspend_display swaymsg "output * dpms off"
+set $resume_display swaymsg "output * dpms on"
############################################################
@@ -56,7 +57,8 @@ set $suspend_system systemctl suspend
# the computer goes to sleep.
exec swayidle -w \
timeout 600 '$lock_screen' \
- timeout 660 '$suspend_system' \
+ timeout 660 '$suspend_display' \
+ resume '$resume_display' \
before-sleep '$lock_screen'
############################################################