From 9314c12718137a7225b843e157e3240b76fd61d2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 20 Jul 2026 09:03:26 -0700 Subject: [PATCH] Test that the clamshell poll is gated to docked laptops Guards the dock-gating in omarchy-hyprland-monitor-watch: the poll runs only when omarchy-hw-laptop and an external monitor are both present, via sync_poll_state, with the event loop fed by process substitution so it can start/stop the poll. Behaviourally simulated (stubbed hw checks + synthetic monitor events): the poll runs only while docked and stops on undock; a desktop or undocked laptop never polls. Co-Authored-By: Claude Fable 5 --- test/shell.d/monitor-recovery-test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/shell.d/monitor-recovery-test.sh b/test/shell.d/monitor-recovery-test.sh index c0d002b0..18cab29b 100755 --- a/test/shell.d/monitor-recovery-test.sh +++ b/test/shell.d/monitor-recovery-test.sh @@ -30,6 +30,11 @@ grep -F 'sync_clamshell_after_monitor_change' "$monitor_watch" >/dev/null grep -F 'socat -U - "UNIX-CONNECT:$SOCKET"' "$monitor_watch" >/dev/null pass "monitor watcher reconciles clamshell state on startup" +grep -F 'omarchy-hw-laptop && omarchy-hyprland-monitor-external-active' "$monitor_watch" >/dev/null +grep -F 'sync_poll_state' "$monitor_watch" >/dev/null +grep -F 'done < <(socat' "$monitor_watch" >/dev/null +pass "clamshell poll only runs on a docked laptop, not desktops or undocked laptops" + grep -F '/proc/acpi/button/lid/*/state' "$hw_clamshell" >/dev/null grep -F 'omarchy-hw-external-monitors' "$hw_clamshell" >/dev/null pass "clamshell helper detects closed-lid external monitor state"