Repository navigation
Center the Quake console in a 2:1 panel instead of spanning the screen. - #9140
Conversation
Size it from leftover workspace gaps so it refits per monitor, and let omarchy_qconsole_ratio change the width.
The scratchpad spanned the whole screen whatever was on it, which reads as a band rather than a console when it holds the single agent it is usually opened for. It now sizes to a centered panel twice as wide as it is tall, and hands the full width back as soon as a second app is on the scratchpad: two windows splitting a half-width column is worse than the band this replaced. The panel is still drawn with workspace gaps rather than a window rule, because Hyprland resolves a rule's size once as the window maps and the console has to survive a rescale. It is always flush with the top and always centered, so two numbers describe it, and the memo that suppresses no-op rewrites compares those rather than four edges. The window count is read on window.open and window.destroy, the two events that run after the workspace's count has settled; window.close and window.move_to_workspace both still count the window on its way out, so refitting from either reads one too many and strands the console at full width. The count is only chased while the console is on screen, since a hidden one is refitted on its way in by workspace.special_active, and every window opened anywhere on the desktop would otherwise rewrite the rule. Monitor width and height are the panel's own pixels, so an output turned on its side still reports them the way the panel is built rather than the way it hangs. The odd transforms are the quarter turns and those swap the work area: without that a rotated 1920x1080 sized its console from 1920x1080 instead of 1080x1920 and left a 214x1367 sliver. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
|
Reviewed, and this needed changes. The panel arithmetic was correct on an ordinary landscape monitor and dead, vacuous or wrong most other places. Fixes are pushed to Rotated monitors got a sliver. Both Four defensive guards were dead against the shipping API.
A layout change could strand the console on an output that had gone away. On the multi-window behaviour, the event you pick decides whether it works. Measured on a live compositor, with the scratchpad's
So the implementation hangs off Verified end to end on Hyprland 0.56.2, not just in unit tests. On a 1280x800 output with a 26px bar: one window measures Two calls are yours, not mine. The first is that I dropped The second is that "more than one app" is read literally as What was checked. The full shell suite, 215 files: 2 failures, The second opinion was Codex at xhigh reasoning effort, run read-only against the PR commit. It independently reached the same conclusions on the dead guards, the dead Waiting on the maintainer for the two calls above. Nothing is needed from you unless you disagree with the rewrite. |
|
I just tested these changes you pushed and it is much improved! Love that opening a second window just expands it back. |
fbd241c to
a59afb9
Compare
A floating window on the console is not laid out by the gaps, so it no longer stretches the panel to full width. Moving an app onto or off the scratchpad and toggling floating now refit too, via window.move_to_workspace and window.update_rules; both were measured on Hyprland 0.56.2 to carry the settled count. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012UyVoFTM98Tduoxg7qZax7
|
Pushed d377569 on top, closing two gaps between the description and the code:
Tests cover float-on-console, tile/float toggles, and moves on and off; each of the three fixes was reverted in turn and the suite failed every time. All 11 hyprland tests pass on the branch merged into current quattro, and loading the merged |
The rename predates omacom#9140, which turned the workspace name into a constant the panel now reads for its window count and its open/move handlers. One CONSOLE constant names special:qconsole everywhere, so the console is sized off its own workspace rather than the scratchpad's. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012UyVoFTM98Tduoxg7qZax7
Summary
box = 2next toshare = 0.5), sized by leftover workspace gaps so it refits when the monitor or scale changes.follow_mousehop onto another screen does not steal the gaps. Quarter-turned monitors swap the work area so the panel is not a sliver.window.open,window.destroy,window.move_to_workspace(Super+Shift+1 / Super+Alt+S), andwindow.update_rules(Super+T / Super+O).window.closeis not hooked; it still counts the window on its way out.Test plan
./test/shell.d/hyprland-qconsole-test.sh