omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

SUPER+O (window-pop) opens window larger than screen at non-1x scale

Open anakinrpi opened this issue 3 months ago • 6 comments

System details

Hyprland 0.56.2, Omarchy 4, scale 1.6

What's wrong?

Pressing SUPER+O (pop window out into floating/pinned mode) opens the window larger than the visible screen area at monitor scale 1.6. The window has to be manually resized every time to fit on screen.

At scale 1 (no scaling) the same window pops out correctly, smaller than the screen, as expected.

Root cause: bin/omarchy-hyprland-window-pop hardcodes a default size of 1300x900 logical pixels regardless of monitor scale:

width=${1:-1300}
height=${2:-900}
...
hyprctl dispatch resizeactive exact $width $height address:$addr

hyprctl works in logical pixels (physical resolution / scale). At higher scale factors the logical resolution can drop below 1300x900, so the popped-out window ends up larger than the available screen space.

Steps to Reproduce:

  1. Set monitor scale to 1.6 (e.g. via Omarchy monitor settings).
  2. Focus any tiled window.
  3. Press SUPER+O.
  4. Observe the window opens larger than the visible screen and must be manually resized to fit.
  5. Set scale back to 1 and repeat: the window fits correctly.

Expected behavior: The default pop-out size should scale with (or be clamped to) the monitor's logical resolution instead of using a fixed 1300x900, e.g. clamping to something like min(1300, logical_width * 0.9) and min(900, logical_height * 0.9).

Workaround: override the keybind in ~/.config/hypr/bindings.lua with an explicit smaller size, e.g.:

hl.unbind("SUPER + O")
o.bind("SUPER + O", "Pop window out (float & pin)", "omarchy-hyprland-window-pop 900 600")

anakinrpi avatar Sep 01 '26 23:09 anakinrpi

Another data point, on a stock config — I never chose a scale, scale = "auto" picked 2 for me.

  • Omarchy 4.0.2-1, Hyprland 0.56.2
  • eDP-1: 2560x1440@60, scale=2, reserved=[0,26,0,0]
  • Intel i7-7500U / HD Graphics 620

Logical desktop is 1280x720, or 1280x694 of work area once the bar's 26px comes off. The 1300x900 default overhangs by 20px horizontally and 206px vertically.

Worth noting for triage: because centerwindow runs after the resize, the overhang is split across opposite edges, so the window is clipped on all four sides at once. That does not look like "the window is bigger than the screen" — it looks like the window is roughly screen-sized and its contents have been scaled up and cropped. I went looking for a scaling bug before I thought to check the pop-out's geometry, and I suspect that framing is why this gets reported in different vocabulary each time (#9731 is the same bug at 1440x900).

Affected panels at the default scale = "auto":

panel logical usable height fits 1300x900?
1920x1080 @1 1920x1080 1054 yes
1920x1080 @1.25 1536x864 838 no
2560x1440 @2 1280x720 694 no
2560x1600 @2 1280x800 774 no
2880x1800 @2 1440x900 874 no
3024x1964 @2 1512x982 956 yes
3840x2160 @2 1920x1080 1054 yes

The 2880x1800 row is the one that argues for clamping against the work area rather than the logical resolution: it is exactly 900 logical pixels tall and fails only because of the bar.

Workaround until a fix lands — a wrapper bound over SUPER + O in ~/.config/hypr/bindings.lua:

#!/bin/bash
read -r w h < <(
  hyprctl monitors -j | jq -r '
    ((map(select(.focused)) | .[0]) // .[0])
    | (.width / .scale) as $lw | (.height / .scale) as $lh | .reserved as $r
    | [ ([$lw * 0.9, 1300] | min | round),
        ([($lh - $r[1] - $r[3]) * 0.9, 900] | min | round) ] | @tsv'
)
exec omarchy-hyprland-window-pop "${w:-1100}" "${h:-620}"

omcular avatar Sep 06 '26 07:09 omcular

Replicating the same issue on my old 1080p desktop monitor at scale = 1.25. Logical size is 1536x864, so with the 26px bar there are only 838px of usable height, and the 1300x900 pop-out window overflows above and below the screen.

Omarchy 4.0.4-1. It seems a solution has been proposed in PR #8517 ... hopefully a solution is reached.

My own crude workaround, in ~/.config/hypr/bindings.lua:

hl.unbind("SUPER + O")
o.bind("SUPER + O", "Pop window out (float & pin)", "omarchy-hyprland-window-pop 1150 700")

dmatthan avatar Oct 01 '26 22:10 dmatthan

This also affects smaller displays at scale 1×, so it is not limited to non-1× scaling.

On Omarchy 4.0.4-1, popping out a browser window with Super+O leaves its bottom extending beyond the screen. The screenshot is 1356 × 900 pixels, with the top bar visible. The monitor configuration uses scale = 1.

The installed bin/omarchy-hyprland-window-pop defaults to:

width=${1:-1300}
height=${2:-900}

It resizes and centers the window without clamping its size to the monitor's usable area. A 900-pixel-tall window cannot fit on a 900-pixel-tall screen once the bar, borders, and margins are accounted for, even at 1× scale.

warpek avatar Oct 04 '26 08:10 warpek

Confirmed in source on quattro: SUPER + O (default/hypr/bindings/tiling.lua:11) calls bin/omarchy-hyprland-window-pop with no arguments, so it falls back to width=${1:-1300} and height=${2:-900} (lines 6–7). It then resizes the window to exactly that size in logical pixels and centers it, without checking the monitor's usable area. Any display whose logical size minus the bar is under 1300x900 overflows on both edges. Scale only matters because it shrinks the logical size, which is why the 1x, 900px-tall panel in the comments overflows too. The script hasn't changed on quattro since the Lua bindings migration, so this is still current.

Open pull request #8517 fixes this. With no arguments, it sizes the window to 80% of the active monitor's usable logical area, after subtracting reserved edges and accounting for rotation. Explicit sizes, like the workarounds above, keep working as before. It already carries Fixes #9699 and Fixes #9731, and #9731 is the same bug at 1440x900. The pull request will be reviewed and run on a worker as its own item. This issue now waits on the maintainer's decision on #8517.

Checked by Claude Opus 5.5 reading the source. No second opinion ran: the configured reviewer, Codex Medium, answered a ping but refused the review because today's review budget was spent.

omarchybot avatar Oct 09 '26 12:10 omarchybot

One more data point on a stock config:

  • Omarchy 4.5.0-3, Hyprland 0.56.2
  • ASUS ROG Zephyrus G14 (GA402NU), eDP-2: 2560x1600@165
  • scale = "auto" picks 2, so the logical desktop is 1280x800 with reserved = [0,26,0,0] (774px usable)

The 1300x900 pop-out overflows by 20px horizontally and 126px vertically. Since it is centered after the resize, the top edge ends up above the work area and covers the bar, which matches the clipped-on-all-sides look described above.

Reporting from 4.5.0-3, so this is still current and not limited to older releases. The workaround here is a small wrapper bound over SUPER + O that sizes the pop-out from the active monitor's usable logical area (size / scale, minus reserved), then centers it inside that area. It works, but #8517's work-area sizing is the right thing to land.

joelrealubit avatar Nov 13 '26 05:11 joelrealubit

The new 4.5.0-3 report is still explained by the current quattro script: SUPER+O requests 1300×900 without checking the work area. PR #8517 has since been updated to cap the default at both 1300×900 and 80% of the active window's monitor's usable area. At its current head, d42db0ccc664e02c8fca0ff4d2568d44843ee57b, the reported 1280×774 work area gives a 1024×619 pop-out. The PR already links this issue and remains open, so this waits on the maintainer's decision on #8517.

Source checked by GPT-6 in Codex (effort not exposed), with a second opinion from Opus 5.5 High and muse-wonder via pi, thinking high. Both reviewers found no actionable defect in how that head addresses the reported sizing problem; they received my source reasoning, so independence is not guaranteed. No new worker tests ran in this issue session; the separate PR session's worker measurements and test results cover that same head.

omarchybot avatar Nov 18 '26 02:11 omarchybot