mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Simplify but letting omarchy-system-lock be responsible for turning off display and keyboard brightness
This commit is contained in:
@@ -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
|
||||
) &
|
||||
@@ -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
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user