Simplify but letting omarchy-system-lock be responsible for turning off display and keyboard brightness

This commit is contained in:
David Heinemeier Hansson
2026-05-06 11:40:34 +02:00
parent dd46e965d8
commit ca74b4d1c5
5 changed files with 14 additions and 24 deletions
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
# omarchy:summary=Lock the screen from idle and turn the display off after a delay
# omarchy:group=system
# omarchy:name=idle
# omarchy:examples=omarchy system idle
if ! loginctl lock-session; then
omarchy-system-lock
fi
(
sleep 10
pidof hyprlock >/dev/null || exit 0
brightnessctl -sd '*::kbd_backlight' set 0 >/dev/null 2>&1
hyprctl dispatch dpms off >/dev/null 2>&1
) &
+7
View File
@@ -17,3 +17,10 @@ fi
# Avoid running screensaver when locked
pkill -f org.omarchy.screensaver
(
sleep 10
pidof hyprlock >/dev/null || exit 0
brightnessctl -sd '*::kbd_backlight' set 0 >/dev/null 2>&1
hyprctl dispatch dpms off >/dev/null 2>&1
) &
@@ -1,9 +1,9 @@
#!/bin/bash
# omarchy:summary=Resume displays and brightness after idle
# omarchy:summary=Wake displays and restore brightness after idle
# omarchy:group=system
# omarchy:name=idle resume
# omarchy:examples=omarchy system idle resume
# omarchy:name=wake
# omarchy:examples=omarchy system wake
hyprctl dispatch dpms on >/dev/null 2>&1
brightnessctl -r >/dev/null 2>&1
+3 -3
View File
@@ -11,9 +11,9 @@ listener {
on-timeout = pidof hyprlock || omarchy-launch-screensaver
}
# Idle system after 5 minutes
# Lock system after 5 minutes
listener {
timeout = 152
on-timeout = omarchy-system-idle
on-resume = omarchy-system-idle-resume
on-timeout = omarchy-system-lock
on-resume = omarchy-system-wake
}
+1 -1
View File
@@ -1,3 +1,3 @@
echo "Use omarchy-system-idle and omarchy-system-idle-resume in hypridle"
echo "Use omarchy-system-lock and omarchy-system-wake in hypridle"
omarchy-refresh-hypridle