From 2c6f888ed71bc79533e184c895f3f5572cfdc3c0 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 11 Jul 2025 02:36:42 +0200 Subject: [PATCH] swayidle: improved script - added screen dim and off --- .config/wayland/swayidle.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/wayland/swayidle.sh b/.config/wayland/swayidle.sh index 3bfefd5..08e8710 100755 --- a/.config/wayland/swayidle.sh +++ b/.config/wayland/swayidle.sh @@ -1,8 +1,11 @@ #!/bin/sh exec swayidle -w \ - timeout 600 "notify-send -u critical 'Power' 'Laptop will suspend in 20 minutes!'"\ + timeout 600 "brightnessctl -s set 0%" resume "brightnessctl -r"\ + timeout 600 "notify-send -u critical 'Power' 'System will suspend in 20 minutes!'"\ timeout 1200 "notify-send -u critical 'Power' 'Laptop will suspend in 10 minutes!'"\ - timeout 1500 "notify-send -u critical 'Power' 'Laptop will suspend in 5 minutes!'"\ + timeout 1200 "notify-send -u critical 'Power' 'Screen will turn off soon'"\ + timeout 1260 "wlr-randr --output eDP-1 --off" resume "wlr-randr --output eDP-1 --on"\ + timeout 1500 "notify-send -u critical 'Power' 'System will suspend in 5 minutes!'"\ timeout 1740 "notify-send -u critical 'Power' 'System will suspend in 1 minute!'"\ timeout 1790 "notify-send -u critical 'Power' 'System will suspend in 10 seconds!'"\ timeout 1795 "notify-send -u critical 'Power' 'System will suspend in 5 seconds!'"\