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