diff --git a/bin/omarchy-system-lock b/bin/omarchy-system-lock index 4b2ad183..a1ea82b4 100755 --- a/bin/omarchy-system-lock +++ b/bin/omarchy-system-lock @@ -23,9 +23,11 @@ fi # Avoid running screensaver when locked pkill -f org.omarchy.screensaver -( - sleep 3 - pidof hyprlock >/dev/null || exit 0 - omarchy-brightness-keyboard off - omarchy-brightness-display off -) & +if [[ ${OMARCHY_LOCK_ONLY:-false} != "true" ]]; then + ( + sleep 3 + pidof hyprlock >/dev/null || exit 0 + omarchy-brightness-keyboard off + omarchy-brightness-display off + ) & +fi diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index dc4df233..32ecb12d 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -1,7 +1,7 @@ general { lock_cmd = omarchy-system-lock # lock screen and 1password - before_sleep_cmd = loginctl lock-session # lock before suspend. - after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display. + before_sleep_cmd = OMARCHY_LOCK_ONLY=true omarchy-system-lock # lock before suspend without scheduling display off. + after_sleep_cmd = sleep 1 && omarchy-system-wake # delay for PAM readiness, then turn on display. inhibit_sleep = 3 # wait until screen is locked }