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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
f1237e1962
commit
9314c12718
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user