Skip to content

Wait for real output before shell launch - #9527

Open
tbasten wants to merge 1 commit into
omacom:quattrofrom
tbasten:fix-docked-clamshell-login
Open

Wait for real output before shell launch#9527
tbasten wants to merge 1 commit into
omacom:quattrofrom
tbasten:fix-docked-clamshell-login

Conversation

@tbasten

@tbasten tbasten commented Sep 1, 2026

Copy link
Copy Markdown

What changed

Launch Omarchy shell through a new omarchy-launch-shell-ready helper. The helper waits until Hyprland reports at least one enabled real output before starting the shell, then reconciles clamshell monitor state and launches omarchy-launch-shell.

If no real output appears after the bounded wait, it logs and falls back to launching the shell.

Why

When logging in docked with the laptop lid closed, Hyprland can start before the external display is fully available. Omarchy shell may then start against Qt's placeholder screen:

There are no outputs - creating placeholder screen

That leaves the user logged in but looking at a blank screen. Waiting for a real output before shell launch fixes the docked clamshell login path.

fixes #9529

Verification

  • Reproduced locally: docked laptop, lid closed, reboot, login caused blank screen.
  • Verified locally: same flow works after the change.
  • bash ./test/shell.d/launch-shell-ready-test.sh
  • bash ./test/shell.d/bin-style-test.sh
  • bash ./test/cli
  • bash -n bin/omarchy-launch-shell-ready test/shell.d/launch-shell-ready-test.sh
  • git diff --check

bash ./test/all was also run. It still fails due to missing local omarchy-pkgs checkout / OMARCHY_PKGS_PATH, unrelated to this change.

Copilot AI lite review requested due to automatic review settings September 1, 2026 01:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new omarchy-launch-shell-ready helper that delays launching the Omarchy shell until Hyprland reports at least one enabled non-placeholder output, improving reliability when logging in docked with the laptop lid closed.

Changes:

  • Add bin/omarchy-launch-shell-ready to wait for a real Hyprland output, reconcile clamshell state, then launch the shell (with a bounded fallback).
  • Update Hyprland autostart to launch the shell via the new helper instead of calling omarchy-launch-shell directly.
  • Add a shell test that verifies readiness waiting behavior, fallback behavior, and the autostart wiring.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
bin/omarchy-launch-shell-ready New helper that waits for a real Hyprland output before launching the shell, with bounded fallback.
default/hypr/autostart.lua Switch autostart to use the display-ready shell launch helper.
test/shell.d/launch-shell-ready-test.sh New test covering placeholder-waiting, bounded fallback, and autostart integration.
Suppressed comments (1)

test/shell.d/launch-shell-ready-test.sh:75

  • Same issue as above: calls[0] / calls[1] will trigger an unbound-variable error if the helper fails before writing both log lines. Guarding on ${#calls[@]} keeps the test output consistent and debuggable.
mapfile -t calls <"$call_log"
[[ ${calls[0]} == "omarchy-hyprland-monitor-clamshell" ]] ||

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/shell.d/launch-shell-ready-test.sh
@tbasten
tbasten force-pushed the fix-docked-clamshell-login branch from 5c9d629 to a2c1c54 Compare September 1, 2026 02:02
@tbasten
tbasten force-pushed the fix-docked-clamshell-login branch from a2c1c54 to 5864bae Compare September 1, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blank screen after docked clamshell login

2 participants