Skip to content

Ignore Hyprland's FALLBACK output when checking for external monitors - #13749

Merged
omarchybot merged 1 commit into
omacom:quattrofrom
dhiasalhiQ:monitor-fallback-output
Oct 25, 2026
Merged

omarchybot merged 1 commit into
omacom:quattrofrom
dhiasalhiQ:monitor-fallback-output

Conversation

@dhiasalhiQ

@dhiasalhiQ dhiasalhiQ commented Sep 29, 2026 •

Copy link
Copy Markdown

When the internal panel is off and the last external monitor is unplugged, Hyprland adds a FALLBACK placeholder output. omarchy-hyprland-monitor-external-active counted it as an active external display, so omarchy-hyprland-monitor-internal recover and the clamshell sync never turned the internal panel back on.

This excludes FALLBACK from the check. It adds a behavioral case to test/shell.d/monitor-recovery-test.sh that stubs hyprctl. The case fails on the old helper and passes with the fix.

Fixes #13741

🤖 Generated with Claude Code

Fixes #8027

When the internal panel is off and the last external monitor is unplugged,
Hyprland adds a FALLBACK placeholder output. The external-active check
counted it as an external display, so the internal panel was never
recovered.

Fixes omacom#13741

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanjyay

sanjyay commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Independent community review

This is an independent community review and unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Tested: omarchy-hyprland-monitor-external-active and monitor recovery handling when Hyprland creates a FALLBACK placeholder output, verified in a clean Omarchy test environment.

Result: The change behaved as expected. On the base branch, omarchy-hyprland-monitor-external-active matches FALLBACK as an active external display because it does not match the internal connector prefix regex, which blocks internal panel recovery when the last external display is unplugged. With select(.name != "FALLBACK"), the helper correctly returns false when only the fallback placeholder remains, allowing internal panel recovery. All monitor test suites pass.

Testing details
  • Tested PR commit: f06e099
  • Base comparison:
    • Base (quattro): Testing bin/omarchy-hyprland-monitor-external-active with a disabled internal display and [{"name":"FALLBACK","disabled":false}] exits 0 (reports active external monitor), causing test/shell.d/monitor-recovery-test.sh to fail: not ok - active external monitor helper ignores Hyprland's FALLBACK output.
    • PR: Helper exits 1 (reports no active external monitor), and monitor-recovery-test.sh passes: ok - active external monitor helper ignores Hyprland's FALLBACK output.
  • Automated test coverage:
    • Ran all monitor test suites (hw-external-monitors-test.sh, monitor-clamshell-scale-test.sh, monitor-modeless-test.sh, monitor-output-name-test.sh, monitor-recovery-test.sh, monitor-scaling-test.sh, monitor-state-test.sh, monitor-test.sh, sleep-monitor-test.sh): all passed.
Non-blocking suggestion
  • In test/shell.d/monitor-recovery-test.sh, consider adding trap 'rm -rf "$external_tmp"' EXIT when creating $external_tmp, so any early failure in external_active won't leave the temporary directory behind in /tmp.

If you'd prefer not to receive these independent reviews on your PRs, reply to this comment and say so, and I won't review your future PRs.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at f06e099, and verified: this fixes #13741 as described.

Reproduced on a real compositor. On a worker built from the Omarchy ISO (Hyprland 0.56.2), disabling the only output leaves hyprctl monitors all -j showing Virtual-1 disabled and FALLBACK enabled. Against that, the quattro version of omarchy-hyprland-monitor-external-active exits 0 (an external monitor is active) and this branch's exits non-zero. The same holds with hyprctl stubbed with the monitor lists from the issue: the docked case still reports active, and the unplugged-with-FALLBACK case no longer does.

Tests, on the worker. All nine monitor suites under test/shell.d/ pass, including monitor-recovery-test.sh. With the helper reverted to quattro's, the new case fails (not ok - active external monitor helper ignores Hyprland's FALLBACK output), so the test is checking the fix rather than passing either way. ./test/cli has one failure, vscode generated theme references current theme file, which fails identically on quattro and is unrelated to this change.

Callers. Every user of the helper (omarchy-hyprland-monitor-internal on/off/recover, omarchy-hyprland-monitor-internal-mirror recover, the clamshell sync and the watcher's poll) wants "a real external display is enabled", so excluding FALLBACK is right for each of them, and the change is the size of the problem.

Second opinion. Codex Medium reviewed the diff and its callers and found no defect in this change; it agrees with the reading above, though its independence from this review is not guaranteed.

Nothing is needed from you; this is waiting on the maintainer.

@omarchybot
omarchybot merged commit 36faffc into omacom:quattro Oct 25, 2026
omarchybot added a commit to Maximilian-Maag/omarchy that referenced this pull request Nov 1, 2026
The mode filter now sits beside omacom#13749's FALLBACK filter in omarchy-hyprland-monitor-external-active. The source greps this branch added to monitor-recovery-test.sh went with omacom#16334, so the 0x0 case is a behavioural check in quattro's stubbed-hyprctl style, and the fixtures carry a mode so the FALLBACK case still exercises its own filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

5 participants