Bar height is rounded to whole logical pixels, ignoring monitor scale — 1px seams at fractional scale
Summary
Style.barToken() rounds the bar height to a whole logical pixel with no knowledge of the monitor's scale factor. On a fractionally-scaled output the resulting physical height is not an integer, so the bar's bottom edge lands mid-pixel. The tiled window below it shares that edge, and the two surfaces do not always round the same way on a given repaint — leaving a 1px seam through which the omarchy-background layer shows.
Because the reserved area sets the usable height for the whole workspace, one fractional bar height also propagates into every horizontal tiling split below it, so the seams appear between windows too, not just under the bar.
Environment
| Omarchy | 4.0.2-1 |
| Hyprland | 0.56.2 (efb5099) |
| Output | eDP-1, 2880x1800 @ 60Hz |
| Scale | 1.6 (logical 1800x1125) |
| Theme | Tokyo Night (stock) |
gaps_in / gaps_out / border_size / rounding |
all 0 |
Gaps and borders being zero matters: there is no configured spacing anywhere, so any visible seam is unambiguously a rendering artifact rather than layout.
Symptom
A 1px line of background appears along the top edge of tiled windows — between the bar and the window, and between vertically stacked windows. It is intermittent: it appears for a moment, disappears on the next full repaint, and returns when interacting with a window. At scale 1.0 it never occurs.
Root cause
shell/Commons/Style.qml:296
function barToken(key, fallback) {
var v = barOverrides[key]
var n = Number(v)
var base = (isFinite(n) && n > 0) ? n : fallback
if (barScaleWithFont) base *= fontScale
return Math.max(1, Math.round(base)) // <-- integer LOGICAL px, scale-unaware
}
Math.round() snaps to the logical grid. The physical grid is what actually gets rendered, and at scale 1.6 (= 8/5) a logical value only lands on it when it is a multiple of 5. The stock size-horizontal of 26 does not:
26 logical x 1.6 = 41.6 physical
So the bar's bottom edge and the window's top edge both sit at physical row 41.6 and must each be rounded. When one rounds to 41 and the other to 42, physical row 41 belongs to neither surface and the background layer shows through. Since that rounding is decided per-render, the seam flickers rather than staying put — which matches the intermittency exactly.
Measured evidence
With the stock bar height, hyprctl reports reserved: [0, 26, 0, 0], an omarchy-bar layer surface of h: 26, and tiled windows at at: [0, 26] with size: [1800, 1099] — all measured. The fractional edges that follow:
logical physical
bar edge / window top 26 -> 41.60 FRACTIONAL (measured)
tall window height 1099 -> 1758.40 FRACTIONAL (measured)
interior horizontal split 576 -> 921.60 FRACTIONAL (derived)
short window height 549 -> 878.40 FRACTIONAL (derived)
vertical split x 900 -> 1440.00 ok
workspace bottom 1125 -> 1800.00 ok
The two rows marked derived are the three-terminal split computed from the layout rules rather than measured directly; an odd usable height of 1099 cannot be halved onto the grid whichever way dwindle rounds it.
Note that the vertical split is exact while every horizontal one is fractional. This predicts that seams appear only on horizontal edges, never between side-by-side windows — which matches what I observe, and is what makes the bug look erratic rather than systematic.
Overriding the bar to a height that does land on the grid (25 -> 40.0 physical exactly) puts every edge back on whole pixels. Measured geometry after the change, same three-terminal layout:
w1 at (0, 25) 900 x 1100
w2 at (900, 25) 900 x 550
w3 at (900, 575) 900 x 550
logical physical
bar edge / window top 25 -> 40.00 ok
interior horizontal split 575 -> 920.00 ok
window heights 550 -> 880.00 ok
tall window height 1100 -> 1760.00 ok
vertical split x 900 -> 1440.00 ok
workspace bottom 1125 -> 1800.00 ok
Steps to reproduce
- Set a fractionally-scaled output whose scale has a denominator that 26 does not clear — e.g.
scale = 1.6. - Zero out spacing so nothing can be mistaken for a configured gap:
general:gaps_in = 0,general:gaps_out = 0,general:border_size = 0,decoration:rounding = 0. - Open three terminals in the default dwindle layout.
- Watch the top edge of the windows, and the horizontal boundary between the two stacked ones, while focusing and interacting with them.
A 1px background-coloured line flickers in and out along those horizontal edges. Confirm the arithmetic with:
hyprctl monitors -j | jq '.[] | {name, scale, reserved}'
hyprctl clients -j | jq -c '.[] | select(.floating==false) | {at, size}'
Any reported edge whose value x scale is not an integer is a candidate seam.
Suggested fix
Snap the bar height to the physical pixel grid of the monitor it is on, rather than to the logical grid — i.e. round logical x scale to an integer and divide back, so the surface always occupies a whole number of physical pixels.
There is precedent for exactly this class of fix in the shell already: #5835 ("Ceil tooltip popup size so right/bottom borders render", merged) fixed a clipped 1px border caused by a fractional Wayland surface size, using Math.ceil(). That patch addressed fractional sizes arising from text metrics; the same reasoning has never been applied to fractional sizes arising from the scale factor. #10084 (tooltip loses a border edge at 1.25x) suggests the tooltip path still has the scale-flavoured version of the same blind spot.
Workaround
Pin the bar to a height that is exact at the display's scale, in ~/.config/omarchy/shell.toml:
[bar]
size-horizontal = 25 # 25 x 1.6 = 40.0 physical, exact
This is display-specific and needs recomputing for a different scale. It also breaks if the text size changes, since barToken multiplies by fontScale ([font] base-size / 12) before rounding.
Confirming this on a 1080p laptop panel, with the stock scale presets.
| Omarchy | 4.0.4-1 |
| Hyprland | v0.56.2 |
| Output | eDP-1, 1920x1080 |
| Scale | 1.25 (logical 1536x864), picked from the Monitor panel |
| Text size | 14 ([font] base-size = 14) |
gaps_in / gaps_out / border_size / rounding |
all 0 |
Same symptom: an intermittent 1px background strip under the bar, most visible while a window opens. hyprctl reports reserved: [0, 30, 0, 0], bar h: 30, and tiled windows at: [0, 30]. 30 x 1.25 = 37.5 physical.
This happens with defaults too. With the default text size of 12 the bar is 26, and 26 x 1.25 = 32.5. So 1.25, which is one of the presets in the Monitor panel, puts the bar edge on a half pixel on a stock install, before anything is customized.
Because barToken multiplies by fontScale before rounding, whether you get a seam depends on the text size and scale together. Neither setting checks the other. Here is 1920x1080 with the default size-horizontal = 26. "OK" means the bar edge and a 50/50 horizontal split both land on whole physical pixels. "bar only" means the bar edge is exact but the split is not.
| text size | bar (logical) | 1.2 | 1.25 | 1.333 | 1.6 |
|---|---|---|---|---|---|
| 9 | 20 | OK | bar only | – | bar only |
| 10 | 22 | – | – | – | – |
| 11 | 24 | – | OK | OK | – |
| 12 (default) | 26 | – | – | – | – |
| 13 | 28 | – | bar only | – | – |
| 14 | 30 | OK | – | OK | bar only |
| 15 | 33 | – | – | bar only | – |
| 16 | 35 | bar only | – | – | OK |
| 17–20 | 37–43 | – | – | bar only (18) | – |
At the default text size, none of the fractional presets gives a seam-free layout on 1080p. That makes me think snapping the bar height to the physical grid (the fix suggested above) is the right approach. Hand-picking a scale and text size that work together is fragile.
My workaround: I switched to scale 1.2 with text size 14 (bar 30 → 36 physical), and the seam went away.
Checked against quattro (10f1cbf7c) and on a fresh Omarchy worker running Hyprland 0.56.2 with quattro's shell, a 1280x800 output set to scale 1.6, and gaps, borders and rounding at 0.
The geometry is as described. barToken() in shell/Commons/Style.qml:298 rounds to a whole logical pixel after applying the text-size factor, and shell/plugins/bar/Bar.qml:1356 uses that integer as the bar's surface height, which also sets the reserved area. On the worker hyprctl reported reserved: [0, 26, 0, 0], a 26px bar, and three tiled terminals at [0,26], [400,26] and [400,263]: the bar edge lands on physical row 41.6 and the stacked split on 420.8, the same fractional edges you measured.
The seam itself did not reproduce here. In screenshots the bar fills physical rows 0–41 and the window starts at row 42, cleanly, and 120 screenshots taken while a fourth window opened and closed showed no gap. That does not rule it out: a screenshot asks the compositor for a fresh frame, and the worker renders on a virtual GPU, so a flicker that lives in partial repaints on real hardware may simply not show up this way.
Why there is no fix PR. Layer-shell sizes and reserved zones are whole logical pixels, so the shell cannot ask for 25.625 or 26.25; the only shell-side remedy is a different whole height per monitor whose product with the scale is whole — a multiple of 5 at 1.6, of 4 at 1.25, of 3 at 4/3. That means the bar changing height by scale, and choosing whether to round up (taller) or down (smaller than the size widgets are drawn at, in shell/Ui/WidgetButton.qml:61), which is a design call for the maintainer. It also would not fix every interior split: Hyprland's dwindle layout halves the remaining height with no grid snapping, so stacked windows can still land between pixels. One detail for whoever takes it on: Screen.devicePixelRatio is a whole number at fractional scale (shell/plugins/bar/BarModel.js:242), so the scale has to come from Hyprland's monitor, not from Qt.
Second opinion from Codex Medium, which checked the same code and Hyprland 0.56.2's layer-shell and dwindle sources: it agreed the fractional edges are real and that no clearly correct shell fix exists, and added that the source establishes the fractional boundaries but not that they are what produces the flicker. Its agreement came after reading my reasoning, so it is not fully independent.
The size-horizontal = 25 workaround stands for 1.6. This now waits on the maintainer to decide whether the bar should snap its height to each monitor's scale.
Yes, there might not be an easy fix, however this is such an ugly problem to those that are affected. Really ruins the aesthetics 😒
Still reproducing—and noticeably more persistent—after upgrading from Omarchy 4.5.0-3 (Hyprland 0.56.2) to 4.6.0rc1-2 (Hyprland 0.57.2-7).
Environment
- Omarchy:
4.6.0rc1-2 - Hyprland:
0.57.2-7(11cbc6c5) - Quickshell:
0.3.2.r7.g2b4501a-13 - Hardware: Lenovo IdeaPad Slim 5 15ARP10, AMD Ryzen 7 7735HS / Radeon 680M (
amdgpu) - Output:
eDP-1,2560x1600@165Hz,scale = 1.6(reserved: [0, 26, 0, 0], tiled windows at[0, 26],1600x974) - Spacing:
gaps_in = 0,gaps_out = 0,border_size = 0,rounding = 0(window-no-gaps.lua)
Repro & verification
- A full-width 1px wallpaper seam under
omarchy-baris reliably triggered on tiled windows (e.g. Electron / Chromium web apps) when switching or moving workspaces with 3- and 4-finger touchpad swipes. - Taking a software screenshot (
grim) immediately clears the seam on screen, matching@omarchybot's note on why automated screenshots didn't catch it. - Setting
size-horizontal = 25in~/.config/omarchy/shell.toml(reserved: [0, 25, 0, 0],25 × 1.6 = 40.0exact physical px) completely eliminates the seam, including across 3-/4-finger swipes.
Filed by Gemini 4 Neon via Antigravity (T3 Code).
I checked current quattro (277c4c34f4) on a clean Omarchy worker with Hyprland 0.57.2, Chromium and two terminals tiled, and the stock no-gaps toggle on. At 1.6×, after running the workspace switch and window move actions from the swipe bindings, the bar and top window edge went from 41.6 physical pixels at the default height to 40 with size-horizontal = 25, then back to 41.6 when I removed the override. The stacked split stayed at 420.8 physical pixels. The cropped worker frames showed no wallpaper seam. Hyprland 0.57.2 marks the whole output for repaint when grim asks for a screenshot, which explains how taking one can clear the reported flicker. Hyprland's screencopy handler
Codex High reviewed the source and ran the worker check. Opus 5.5 High and muse-wonder via pi, thinking high checked the geometry and the proposed sizing change. They found that a 26-pixel bar would have to grow to 30 at 1.6× to align the edge while preserving the configured minimum. A comparison of 25, 26, 27 and 30 pixels on the affected panel would separate pixel alignment from the effect of changing the height. The evidence supports 25 as a workaround at 1.6×. The issue now waits on the maintainer to decide whether Omarchy should adjust bar height by output scale.