From 4e4a688fdff831566567dd2e01ed8ed10149e895 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 6 May 2026 12:52:17 +0200 Subject: [PATCH] Prevent flicker on waking from sleep --- bin/omarchy-system-lock | 14 ++++++++------ config/hypr/hypridle.conf | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) 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 }