diff --git a/bin/omarchy-system-idle b/bin/omarchy-system-idle deleted file mode 100755 index 1ea458ea..00000000 --- a/bin/omarchy-system-idle +++ /dev/null @@ -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 -) & diff --git a/bin/omarchy-system-lock b/bin/omarchy-system-lock index 0ccd4d90..5ffa2db9 100755 --- a/bin/omarchy-system-lock +++ b/bin/omarchy-system-lock @@ -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 +) & diff --git a/bin/omarchy-system-idle-resume b/bin/omarchy-system-wake similarity index 55% rename from bin/omarchy-system-idle-resume rename to bin/omarchy-system-wake index d1ce990f..df3df739 100755 --- a/bin/omarchy-system-idle-resume +++ b/bin/omarchy-system-wake @@ -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 diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index fab950a4..dc4df233 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -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 } diff --git a/migrations/1778054328.sh b/migrations/1778054328.sh index b7b15fd3..1722c7b4 100644 --- a/migrations/1778054328.sh +++ b/migrations/1778054328.sh @@ -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