From 1e3c43a59bb2c058b07e95ea8254fa9c5d8e9119 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 11 Aug 2026 14:16:32 -0700 Subject: [PATCH] Assert the focused monitor the panel actually reports omarchy-monitor-state stopped shelling out to omarchy-hyprland-monitor-focused when it started deriving the focused name from its own hyprctl snapshot, so the stub the test installed was never called and the assertion could never pass. Expect the focused monitor from the fixture instead, and drop the dead stub. Co-Authored-By: Claude Opus 5 --- test/shell.d/monitor-state-test.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/shell.d/monitor-state-test.sh b/test/shell.d/monitor-state-test.sh index efc1a52e..b568172f 100755 --- a/test/shell.d/monitor-state-test.sh +++ b/test/shell.d/monitor-state-test.sh @@ -22,11 +22,6 @@ cat >"$test_bin/omarchy-brightness-display" <<'EOF' echo 42 EOF -cat >"$test_bin/omarchy-hyprland-monitor-focused" <<'EOF' -#!/bin/bash -echo FOCUSED -EOF - cat >"$test_bin/omarchy-hyprland-monitor-scaling" <<'EOF' #!/bin/bash echo 1.5 @@ -91,14 +86,14 @@ assert_line 1 eDP-1 "monitor state names the internal monitor" assert_line 2 DP-1 "monitor state names the external monitor" assert_line 3 eDP-1 "monitor state reports the internal monitor enabled" assert_line 4 "" "monitor state reports no mirror while extended" -assert_line 5 FOCUSED "monitor state reports the focused monitor" +assert_line 5 DP-1 "monitor state reports the focused monitor" assert_line 6 1.5 "monitor state reports the scale" pass "monitor state keeps its lines aligned when nothing is mirrored" monitor_state "$mirrored" assert_line_count "monitor state answers every line while mirroring" assert_line 4 DP-1 "monitor state names the mirroring external monitor" -assert_line 5 FOCUSED "monitor state still reports the focused monitor while mirroring" +assert_line 5 eDP-1 "monitor state still reports the focused monitor while mirroring" pass "monitor state reports the external monitor when it mirrors the internal" monitor_state "$reverse_mirrored"