Skip to content

Floating bar: margin, radius, a switch and Hyprland-derived defaults - #13138

Open
cristian-fleischer wants to merge 9 commits into
omacom:quattrofrom
cristian-fleischer:bar/2-floating
Open

cristian-fleischer wants to merge 9 commits into
omacom:quattrofrom
cristian-fleischer:bar/2-floating

Conversation

@cristian-fleischer

@cristian-fleischer cristian-fleischer commented Sep 24, 2026 •

Copy link
Copy Markdown

Lets the bar sit off the screen edge and line up with the windows, with the same corners as the windows (square on stock Omarchy). Off by default.

This builds on #9725 by @Marc-AnthonyG, which itself builds on #8975 by @ekrist1. Their two commits are included with authorship kept, rebased onto the reworked bar (#15517), the opaque, glassy and clear backgrounds (#14991) and the full-screen bar window (#6782). On that window the margins inset the painted strip instead of the window, and #9725's drag-point fix is no longer needed, so it is dropped. #9725's --inset now scales with the 1920 px sample canvas from #14281. Its Bar.qml and Style.qml source asserts are dropped, since #16334 removed that kind of test. If you'd rather merge #9725 first, the rest of this PR goes on top of it.

From #9725

  • [bar] margin in shell.toml, a CSS-style list (N, "Y X", "T X B", "T R B L") through the existing Geometry.parseWidthSpec, and [bar] radius.
  • Clear-bar text sampling (omarchy-bar-text-color --inset) accounts for the margin.
  • From Feature: Allow user to create floating bar by adding support for custom margin and bar radius. #9725's update, with @Marc-AnthonyG as co-author: the clear-bar text sample measures the screen in logical pixels, so it lands on the bar on a scaled display.
  • Also from that update: a theme top margin counts toward clearing a notch. The bar's floor shrinks by the margin, and once the margin clears the cutout the center sections stay in the middle. A bar floating in the gap keeps the flush floor, so switching floating still never moves a window.

Added on top

  • bar.floating in shell.json (true / false) switches it without editing a theme. Unset, a theme margin on an edge the bar touches floats it as in Feature: Allow user to create floating bar by adding support for custom margin and bar radius. #9725; a margin on the far side alone leaves it flush.
  • A floating bar with no theme margin floats inside the space a flush bar already reserves: half of Hyprland's general:gaps_out from the screen edge, so the gap is the same on both sides of the bar, and the full gaps_out at its ends, so they line up with the windows (Bar: allow the bar to be inset from the screen edges so it lines up with tiled windows #13027). It reserves only its own thickness, so Hyprland reserves exactly what it reserves for a flush bar and switching floating on or off never moves a window. A theme margin is reserved on top of the bar, as in Feature: Allow user to create floating bar by adding support for custom margin and bar radius. #9725.
  • The zone uses the bar's full thickness on its screen, so a bar made taller by a notch floats the same way.
  • radius applies only while the bar floats, so a flush bar stays square (in Feature: Allow user to create floating bar by adding support for custom margin and bar radius. #9725 a theme radius also rounded the flush bar). Unset, it follows decoration:rounding; it is capped at half the bar thickness. The opaque and glassy backgrounds both take the rounding.
  • Bar popouts, clicks forwarded while one is open, dragging a widget off the bar to remove it, and notification toasts measure from the strip's inner face, so they follow a floating bar. Third-party widgets get the margins as bar.barMargins, and plugins that place their own windows as shell.bar.barMargins, both as copies. Tray menus and the other PopupCards leave room for the edge margin, and the bar-move preview shows where a floating bar would land.
  • Since Drag a bar module off the bar to remove it with a poof #6782 the bar window spans its screen and paints a strip along its edge. A floating bar puts that strip in a frame inset by the margins, so the strip's own code is untouched and a flush bar is the same layout at zero inset.
  • The theme template keeps margin and radius as commented examples, so generated themes don't pin radius = 0.
  • The omarchy agent skill (plugins.md) gets a Floating Bar section: the switch, the Hyprland defaults and the theme keys, so an agent asked for a floating bar knows where to look.

Unchanged unless enabled

With neither bar.floating nor a theme margin, the bar renders exactly as on quattro: 0 differing pixels at all four positions, opaque and clear background (whole-screen diff in a nested Hyprland).

Tests

bar-test.sh: value tests for the floating rules (BarModel.barFloating, barMargins, floatsInGap, barRadius), where the strip sits and what the bar reserves (stripRect, reservedMargin), and the gaps_out parse. notifications/logic.cjs: toast clearance (Delivery.barReach, a notch-tall bar included). bar-notch-test.sh: the notch floor less a theme top margin, and a bar floating in the gap reserving what a flush bar reserves. bar-text-color-test.sh: #9725's --inset and scaled-screen cases, and insets on a 4K screen scaled to the sample canvas. After the rebase onto #6782, checked again in a nested Hyprland: bar-drag, bar-icon-geometry and bar-widget-contract pass; a top bar floating in the gap reserves 26 px like a flush one, a theme margin of 10 reserves 36; a left bar floats the same way; the right-click card and a panel open below a floating bar.


Part of a set of opt-in bar changes described in #13136: #13137 [bar] size keys, #13138 floating, #13139 pills, #13140 bar options. Nothing changes unless you turn it on.

Claude (Anthropic) wrote most of this under my supervision; I reviewed it and run it on my own Omarchy install.

@llstrk

llstrk commented Sep 25, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: The floating bar's own geometry and reserved space check out. Popout panels and notification toasts elsewhere in the shell still place themselves as if the bar were flush against the screen edge, so they misalign once floating is on. Two documentation corrections and one large-gap limit follow.

Verified:

  • With the feature off (bar.floating unset and no theme margin, or false over a theme margin), the bar's layer-surface box, reserved space, hidden parking, square corners, transparent-text sampling crop and drag mapping match the base for all four positions.
  • Floating in the gap: Hyprland 0.56.2 reserves the exclusive zone plus the anchored margin (src/render/Renderer.cpp), so a zone of barSize - m reserves exactly barSize. With uniform or per-side gaps_out, toggling floating leaves the work area unchanged and the bar ends line up with the windows.
  • The css field of hyprctl -j getoption general:gaps_out is parsed per side, and the margin/radius theme keys handle zero, negative, unit-suffixed and malformed values.
  • bar-test.sh and bar-text-color-test.sh pass on the PR head, and the new cases fail against the base code.

Popout panels and notification toasts ignore the bar margin

shell/Ui/KeyboardPanel.qml (unchanged by this PR) maps the clicked icon into the bar window's local coordinates, uses that as a screen coordinate, and places the card barH + gap from the screen edge (anchorScreenPos, cardOrigin). Its click forwarding (inBarRegion, barPoint, _barStripSize) makes the same assumption. Toast clearance in shell/plugins/notifications/Service.qml is barSize + Style.gapsOut, with no margin term. KeyboardPanel backs the audio, network, bluetooth, power, clock and several other bar panels. PopupCard.qml anchors to the bar window itself and is not affected.

Top bar, 26 px, stock gaps_out = 10, values evaluated from the production expressions (not observed on screen):

                      bar (y)    card / toast top (y)   card vs icon centre
flush (control)       0..26      31  (5 px gap)         centred
floating, in gap      5..31      31  (touching)         about 10 px left
floating, margin=10   10..36     31  (5 px overlap)     about 10 px left

Bottom, left and right bars show the same pattern on their own axes. With a panel open, a click on the bar is forwarded with the same offset, so it can reach a neighbouring widget, or land outside the recognised bar strip and close the panel instead.

Impact: Only with floating enabled, so existing setups are unchanged. When it is on, every popout opened from the bar is off-centre and touches or overlaps the bar, toasts do the same, and forwarded clicks can hit the wrong widget.

Suggested change: Expose the bar's barMargins through the bar and add them where KeyboardPanel converts between bar and screen coordinates (anchorScreenPos/cardOrigin, barPoint, _barStripSize) and to the toast barClearance, as the PR already does for drag mapping and text sampling.

Documentation

Suggested change: docs/omarchy-shell.md says to turn the feature on with omarchy bar floating true, but bin/omarchy-bar at this head has no floating command (omarchy-bar: unknown command: floating). The command arrives with #13140. Dropping it here, or noting that dependency, would keep the docs accurate for this PR alone.

Suggested change: The example margin = "4 8" # 4 from the anchored edge, 8 at the two ends holds only for top and bottom bars. "Y X" expands to 4 top/bottom and 8 left/right, so a left or right bar gets 8 at its anchored edge and 4 at its ends. A comment such as # 4 above and below, 8 left and right is accurate for every position.

Large gaps_out note: The in-gap zone is clamped with Math.max(1, barSize - m). Once half of gaps_out reaches the bar thickness (gaps_out of 51 or more for a 26 px top bar), the floating bar reserves m + 1 instead of barSize, so toggling floating does move windows: gaps_out = 80 reserves 41 px instead of 26. The docs state window stability without that condition; a short qualifier would cover it.

Optional test improvement: Most of the new bar-test.sh checks match Bar.qml/Style.qml source text. In diagnostic copies of the head, five realistic breakages still passed the suite: dropping the per-side gaps_out parse, not insetting the bar ends, never applying the radius, never reading bar.floating, and painting the background on the window again (square corners). A behaviour-preserving rewrite of the exclusive-zone expression failed it. Moving the window margin and zone wiring into BarModel functions with value assertions, plus a value test for the gaps_out JSON parse, would let the tests follow behaviour rather than wording.


Review information

Test scope: Source review of head 3d04c27 against base 28ceaae, including the Quickshell 0.3.1, Hyprland 0.56.2 and Qt 6.11.2 source the bar geometry depends on. The repository's bar tests, extra text-sampling cases and the diagnostic mutations above ran in an isolated command-line sandbox on head and base, with the JavaScript under a Node-compatible runtime. No compositor or shell was launched: the rendered bar, rounded corners and popout offsets were not observed on screen, and the PR's 0-pixel feature-off screenshot comparison was not re-measured.

AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@cristian-fleischer

Copy link
Copy Markdown
Author

Thanks @llstrk, the popout finding was a real bug.

  • KeyboardPanel now maps between bar and screen through the bar window's origin. Popouts center on their icon and keep their gap to the bar's outer face, and forwarded clicks hit the right widget. Toasts clear the edge margin too. Third-party widgets get the margins as bar.barMargins.
  • The window margins and exclusive zone are now BarModel functions with value tests, plus a value test for the gaps_out parse. All five mutations you listed now fail the suite.
  • Docs: dropped the omarchy bar floating reference (it comes with Bar options: right-click menu, omarchy bar pills|floating, menu rows #13140), fixed the "4 8" comment, and noted the gaps_out > 50 limit.

Checked on screen in a nested Hyprland with the bar floating, top and right.

@llstrk

llstrk commented Sep 27, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: Follow-up on the earlier review and the author's reply, checked at head ced6275. All five earlier points are resolved; for the large-gaps_out point, the qualifier is in the main docs only. No regressions were found in the changed or shared code. One new low-impact finding (the plugin bar facade has no margin), an optional test improvement and some documentation notes follow.

Earlier point Status at ced6275
Popouts and toasts ignore the bar margin Resolved
Docs cite a missing omarchy bar floating command Resolved
"4 8" example comment wrong for side bars Resolved
Large gaps_out limit missing from the docs Resolved in docs/omarchy-shell.md (see Documentation)
Optional test improvement: source-text checks Resolved for the five named breakages, as reproduced here

Verified:

  • Popout placement, click forwarding and toast clearance were evaluated from the real KeyboardPanel.qml and notifications/Service.qml expressions, covering all four bar positions, floating in the gap (uniform and per-side gaps_out), theme margins 10 and "4 8", and icon-anchored and centerOnBar panels. In all 32 floating cases, the card sits exactly gap (5 px) off the bar's outer face and centres on its icon, or on the bar for the clock and weather panels. A click at the icon is forwarded to it with no offset, and toasts keep a 5 px gap from top and right bars. The same evaluation on the base code reproduces the earlier table.
  • With a flush bar, and with floating: false over a theme margin, popouts, click forwarding and toasts are identical to the base in all 16 cases.
  • Moving the window margins and exclusive zone into BarModel preserves behaviour: the logic is identical per edge.
  • The docs now name the "floating": true key under bar. omarchy bar position, transparent and use keep that key when they rewrite shell.json. The "4 8" comment matches parseWidthSpec for every position.
  • Evaluated with the real BarModel: gaps_out 50 reserves 26 px, 51 reserves 27, and 80 reserves 41. This matches the "up to 50" and "half of gaps_out plus 1" in the new docs.
  • bar-test.sh (132 checks) and bar-text-color-test.sh pass on the head. The head's bar-test.sh fails on the earlier head's code, where windowMargins and exclusiveZone do not exist yet. Each of the five earlier breakages, as reproduced here, now fails bar-test.sh.

Test coverage of the popout fix

Optional test improvement: The new popout and toast handling is checked only by matching source text (bar-test.sh, the KeyboardPanel/Service.qml regexes). In diagnostic copies of the head, six edits that undo parts of it still passed bar-test.sh:

  • forcing KeyboardPanel's barMargins to zeros (a full revert of the popout fix)
  • restoring the old top-card y
  • dropping the margin from barY
  • dropping barEdgeMargin from _barStripSize
  • setting the toast liveBarMargin to 0
  • removing the api.barMargins binding

A behaviour-preserving rewrite of barX failed it. Two close variants of the earlier breakages also still pass: the radius not applied through the barRadius binding, and bar.floating ignored in the floating binding. Moving the bar-origin, card-placement and toast-clearance arithmetic into small BarModel-style functions with value tests, as the PR now does for windowMargins and exclusiveZone, would cover the six edits above. The two binding variants need their own check of how floating and barRadius are fed.

Plugin bar facade omits barMargins

shell/services/PluginBarStateApi.qml, the shell.bar view given to non-first-party plugins that position their own windows, exposes barHidden, barSize, fontFamily and position but no barMargins. Bar widgets get the margins through PluginBarApi; these plugins do not.

Impact: A plugin that places a window the way the built-in toasts now do reads a 0 margin and sits against or over a floating bar, as the built-in toasts did before this revision. Whether such plugins exist today was not checked.

Suggested change: Add barMargins to that facade and bind it in shell.qml next to the other four.

Documentation

  • shell/plugins/bar/README.md:51 ("which do not move") and default/agents/skills/omarchy/plugins.md:40 ("Windows do not move when floating is toggled") still state window stability without the large-gaps_out condition now given in docs/omarchy-shell.md.
  • In that condition, "half of gaps_out stays below the bar's thickness" is one value off at gaps_out = 51: half is 25.5, but the margin rounds to 26, so windows move by 1 px. The "up to 50" figure is right.
  • Optional: listing bar.barMargins in the widget property lists (README.md "Bar properties available to widgets", docs/omarchy-shell.md) would let widget authors find the new property.

Review information

Test scope: Follow-up source review of head ced6275 against the earlier reviewed head 3d04c27 and merge-base 28ceaae, including the Quickshell 0.3.1 and Hyprland 0.56.2 source that the placement depends on. The repository's bar tests, the diagnostic mutations and an evaluation of the popout and toast placement expressions extracted from the head and base code ran in an isolated command-line sandbox under Node. No compositor or shell was launched. Rendered placement and click forwarding were not observed on screen, and the author's nested-Hyprland check was not reproduced. The model assumes no other exclusive layer surface offsets the bar, as the base code does.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@cristian-fleischer

Copy link
Copy Markdown
Author

Thanks @llstrk, all taken.

  • Popout placement is now PanelGeometry.js and toast clearance is NotificationLogic.barClearance, both tested by value. The QML checks only cover how the bar margins are passed in. Your six edits and the two binding variants now fail bar-test.sh.
  • PluginBarStateApi has barMargins, bound in shell.qml.
  • The bar README and the skill now carry the gaps_out limit, the docs say "half of gaps_out, rounded", and bar.barMargins is in both widget property lists.

Another review pass found a few more things, also fixed:

  • The exclusive zone is now set only while the bar floats in the gap. Quickshell's exclusiveZone setter also switches the window to ExclusionMode.Normal, so a flush or hidden bar now never touches it and keeps Auto or Ignore as in the base.
  • A flush bar no longer depends on Hyprland's gaps, so a gaps refresh does not re-run the text sampler.
  • Tray menus and the other PopupCards leave room for the edge margin, and the move preview shows where a floating bar would land.

@llstrk

llstrk commented Oct 1, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: At dfc1fab, the five points from the previous follow-up are resolved (author's reply); one new low-impact defect was found.

Resolved: popout/toast value tests, PluginBarStateApi.barMargins, gaps_out wording, property lists.

A far-edge-only theme margin keeps a floating bar flush

BarModel.hasMargin checks all four sides of [bar] margin; windowMargins uses only the touched edges. A top bar with margin = "0 0 10 0" sits flush yet rounded (when a radius applies), and "floating": true does not move it into the gap. Impact: low; no shipped theme sets margin.

Suggested change: Check only the touched edges in barFloating, floatsInGap and barMargins, passing the position to the first two.

Reproducer (fails at dfc1fab)

Each block goes after the line assertEqual(bar.floatsInGap(false, noMargin), false, 'a flush bar reserves as it always has') in test/shell.d/bar-test.sh. The file's own bar, gaps (12 on every side) and noMargin are in scope. Run with bash test/shell.d/bar-test.sh. Add one block at a time, because the file stops at its first failure.

Block 1: a flush-sitting bar is rounded.

// A theme margin only on the edge a top bar does not touch leaves the bar
// flush, so it should stay square like any flush bar.
const farEdge = { top: 0, right: 0, bottom: 10, left: 0 }
const farEdgeFloats = bar.barFloating(undefined, farEdge)
assertDeepEqual(bar.windowMargins('top', bar.barMargins(farEdgeFloats, farEdge, gaps, 'top'), 26, false), noMargin, 'a top bar with a bottom-only theme margin sits flush')
assertEqual(bar.barRadius(farEdgeFloats, undefined, 8, 26), 0, 'a top bar that sits flush stays square')

Actual output at dfc1fab (exit 1; earlier ok lines omitted):

ok - a top bar with a bottom-only theme margin sits flush
expected: 0
actual:   8
not ok - a top bar that sits flush stays square

Block 2: bar.floating: true does not float the bar in the gap.

// bar.floating true with a theme margin that touches none of the bar's
// edges should float the bar in the gap, as with no theme margin.
const farEdge = { top: 0, right: 0, bottom: 10, left: 0 }
const switched = bar.barMargins(bar.barFloating(true, farEdge), farEdge, gaps, 'top')
assertDeepEqual(bar.windowMargins('top', switched, 26, false), { top: 6, right: 12, bottom: 0, left: 12 }, 'bar.floating true floats a top bar in the gap when the theme margin is only on its far edge')

Actual output at dfc1fab (exit 1; earlier ok lines omitted):

expected: {"top":6,"right":12,"bottom":0,"left":12}
actual:   {"top":0,"right":0,"bottom":0,"left":0}
not ok - bar.floating true floats a top bar in the gap when the theme margin is only on its far edge

The expected values are one reading of the docs ("a flush bar stays square", "Turn it on with "floating": true"). The docs do not say which rule wins when the margin is non-zero only on an edge the bar does not touch.

Details

Verified:

  • Each of the previous follow-up's popout, toast and binding edits, in its current form, now fails bar-test.sh.
  • exclusiveZone is written only while the bar floats in the gap. Quickshell 0.3.1's setter forces Normal, and the Binding with RestoreNone never writes for a flush or hidden bar (source reading plus a model of the state changes, not a running shell).
  • PanelGeometry.js and NotificationLogic.barClearance give the same results as the code they replaced in 240 popout and 40 toast cases. Flush bars match the base.
  • The move preview lands where the bar window does in all 72 cases checked.
  • The eight files also changed on quattro merge without conflicts, and bar-test.sh passes on the merged tree.

Optional test improvement: of the move preview's geometry, the check covers only x (plus the start of the radius call). Each of these edits to Bar.qml still passes bar-test.sh: the preview y ignoring the margin, width ignoring the margins, and the radius ignoring the theme [bar] radius. This check, added after the existing move-preview assertion, passes at dfc1fab and fails on each edit:

assert(
  /y: modelData === "bottom" \? parent\.height - edgeSize - edgeMargins\.bottom : edgeMargins\.top/.test(barSource) &&
  /width: edgeVertical \? edgeSize : parent\.width - edgeMargins\.left - edgeMargins\.right/.test(barSource) &&
  /height: edgeVertical \? parent\.height - edgeMargins\.top - edgeMargins\.bottom : edgeSize/.test(barSource) &&
  /radius: BarModel\.barRadius\(root\.floating, Style\.barOverrides\["radius"\] !== undefined \? Style\.bar\.radius : undefined, Style\.cornerRadius, edgeSize\)/.test(barSource),
  'the move preview places and rounds every edge like the bar'
)

Optional: the comment on BarModel.exclusiveZone (BarModel.js:273-282) still justifies the inGap = false branch, but the zone is now written only while the bar floats in the gap (exclusiveZone(true, …)), so that branch and its two tests (bar-test.sh:171-172) cover code nothing calls.

Related PR: #13569 also adds a bar.floating setting, with a different window size and exclusive-zone approach, in the same Bar.qml code.


Review information

Test scope: Source and Node sandbox tests at dfc1fab (vs ced6275, merge-base, quattro tip); not run in Hyprland or Quickshell.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@cristian-fleischer

Copy link
Copy Markdown
Author

Thanks @llstrk, fixed. barFloating, floatsInGap and barMargins now count a theme margin only on the edge the bar is anchored to and the two edges it spans. A margin on the far side alone leaves the bar flush and square, and "floating": true moves it into the gap. Tests cover a top, a bottom and a side bar with the same margin.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds an opt-in floating bar through bar.floating and theme margin settings.

  • Bars can float off the screen edge without shifting windows.
  • Popouts and notifications now leave room for a floating bar.
  • Clear bars sample the wallpaper strip they actually cover.

No new actionable issues were established. The previous unnumbered findings are addressed in the current code.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["bar.floating and theme margins"] --> B["Choose floating state"]
  C["Hyprland gaps and rounding"] --> D["Choose margins and radius"]
  B --> D
  D --> E["Inset painted strip"]
  E --> F["Place popups and notifications"]
  E --> G["Measure drag boundaries"]
  E --> H["Sample wallpaper beneath strip"]
  D --> I{"Theme margin?"}
  I -->|Yes| J["Reserve thickness plus anchored margin"]
  I -->|No| K["Keep flush reserved space"]
Loading

Reviews (14) · Last reviewed commit: "Merge branch 'bar/1-numeric-keys' into b..." · Reviewed by Greptile

Comment thread shell/plugins/bar/Bar.qml Resolved
@cristian-fleischer

Copy link
Copy Markdown
Author

Rebased onto the bar rework (#15517) and the new backgrounds (#14991). Floating now uses the bar's notch-aware thickness, and opaque and glassy both take the rounding. With floating off the bar still matches quattro pixel for pixel.

@Marc-AnthonyG

Copy link
Copy Markdown

I wish this or my pr would merge but it feel hopeless

Marc-AnthonyG pushed a commit to Marc-AnthonyG/omarchy that referenced this pull request Oct 19, 2026
A detached bar sits its margin off the screen edge, but the panels opened
from it, the clicks they forward back to the bar, and notification toasts
still placed themselves as if it were flush: with a 10px margin a top
bar's panels overlapped it and opened a margin left of their icon, and
toasts covered it.

Panels now place themselves from the bar window's origin and outer face
(PanelGeometry.js), popup cards leave room for the edge margin, and
toasts clear it. Widgets get the margins as bar.barMargins and plugins
that place their own windows as shell.bar.barMargins, both as copies.

Taken from Cristian Fleischer's floating bar work in omacom#13138, without its
floating switch.

Co-authored-by: Cristian Fleischer <1486327+cristian-fleischer@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QJ9xdGDgAWUqbEooHGuMBS
@cristian-fleischer

Copy link
Copy Markdown
Author

Thanks for keeping at it, and for the co-author credit. Your new commits fix two things #13138 gets wrong too: the wallpaper sample on a scaled screen and a top margin over a notch. I'll take both into #13138 with you as co-author.

I think two floating PRs make it harder for the maintainers to say yes to either. What do you think if we make it one? I'm happy to rebase #13138 on #9725, so it only adds the floating switch and the Hyprland-derived defaults on top of your margin and radius.

Comment thread shell/plugins/bar/Bar.qml Resolved
Comment thread shell/shell.qml Resolved
@greptile-apps

greptile-apps Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@cristian-fleischer
cristian-fleischer force-pushed the bar/2-floating branch 2 times, most recently from 5c58335 to 9251b39 Compare October 22, 2026 19:26
Comment thread shell/plugins/bar/Bar.qml Resolved
Comment thread docs/omarchy-shell.md Resolved
@cristian-fleischer
cristian-fleischer force-pushed the bar/2-floating branch 3 times, most recently from e1ded36 to cbb002a Compare October 29, 2026 14:55
201de1c lets icon-slot, icon-canvas, icon-size, icon-font and
status-slot through the [bar] parser, which fixes part 1 of omacom#11359. The
keys are still missing from docs/omarchy-shell.md and the theme template.

docs/omarchy-shell.md and shell.toml.tpl list the keys with their
defaults; the Style.qml header names them. icon-font is the font size an
icon button renders its glyph and label at; the drawn glyph is rescaled
to fit icon-size, so it does not make the icon bigger.

Co-Authored-By: Claude <noreply@anthropic.com>
Espen Kristensen and others added 6 commits November 2, 2026 14:09
[Rebased onto the full-screen bar window (omacom#6782): the margin insets the
painted strip instead of the window, and the exclusive zone grows by it.
The [bar] parser setup its test runs moves here from the size-keys test,
which upstream no longer needs.]
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
bar.floating in shell.json turns the detached bar on or off without
editing a theme. Unset, a [bar] margin on an edge the bar touches floats
it as before; false keeps it flush whatever the theme says.

A floating bar with no theme margin floats inside the space a flush bar
already has: half of Hyprland's general:gaps_out from the screen edge, so
the gap above the bar matches the gap below it, and the full gaps_out at
its ends, so they line up with the windows. It reserves only its own
thickness, so Hyprland leaves the windows where a flush bar leaves them
and switching floating on or off never moves a window. A theme margin is
reserved on top of the bar. The radius applies only while the bar
floats, so a flush bar stays square; unset it follows
decoration:rounding, and it is capped at half the bar thickness.

Bar popouts, clicks forwarded while one is open, the drag-off-to-remove
distance and notification toasts measure from the strip's inner face, so
they follow a floating bar. Popup cards (tray menus, media, the bar
options) leave room for the edge margin, and the move preview shows where
a floating bar would land. Third-party widgets get the margins as
bar.barMargins, and plugins that place their own windows as
shell.bar.barMargins, both as copies. A flush bar does not depend on
Hyprland's gaps at all.

The margins, the strip's place on its screen and the margin reserved past
the thickness are BarModel functions, and the toast clearance is
Delivery.barReach, all tested by value along with the gaps_out parse.

The theme template keeps margin and radius as commented examples, so a
generated theme no longer pins radius to 0 and margin reads as unset.

The omarchy agent skill (plugins.md) explains the switch, the Hyprland
defaults and the theme keys, so an agent asked for a floating bar knows
where to look.

Co-Authored-By: Claude <noreply@anthropic.com>
The bar's size and its insets are logical pixels, but the screen was
measured in hyprctl's physical mode, so on a scaled display the sample
missed the strip a floating bar covers. Measure the screen in logical
pixels too, and fall back when a top or left inset pushes the strip off
the screen instead of sampling what is left of it.

From Marc-Anthony Girard's omacom#9725.

Co-authored-by: Marc-Anthony Girard <marcanthony.girard.pro@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
A theme top margin moves the bar down past part or all of a camera
cutout, but the bar still took the whole cutout as its floor and still
moved its center sections beside the right one. The cutout now reaches
into the bar only as far as it extends past the margin: the floor
shrinks by the margin, and a margin that clears the cutout leaves a
plain bar with its center in the middle. A flush bar has no margin, so
it is unchanged.

A bar floating in the gap keeps the flush floor. It reserves only what a
flush bar reserves, so a thinner bar there would move the windows when
floating is toggled.

From Marc-Anthony Girard's omacom#9725.

Co-authored-by: Marc-Anthony Girard <marcanthony.girard.pro@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
A top bar on a notched screen is taller than barSize, but the radius was
capped at half of barSize on every screen: a 50 px bar with radius = 20 got
13 px corners. Each bar surface now caps the radius at half its own
thickness.

Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts:
#	default/themed/shell.toml.tpl
#	shell/Ui/KeyboardPanel.qml
#	shell/plugins/bar/Bar.qml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants