Skip to content

Bar options: right-click menu, omarchy bar pills|floating, menu rows - #13140

Open
cristian-fleischer wants to merge 13 commits into
omacom:quattrofrom
cristian-fleischer:bar/4-bar-options
Open

cristian-fleischer wants to merge 13 commits into
omacom:quattrofrom
cristian-fleischer:bar/4-bar-options

Conversation

@cristian-fleischer

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

Copy link
Copy Markdown

One place to switch the bar background, floating and pills, for people and for agents.

Needs #13138 and #13139; their commits are included until they merge. The new work is the last commit. Rebased onto the reworked bar, the opaque, glassy and clear backgrounds and the full-screen bar window (#6782); the menu rows moved to Appearance › Menu Bar.

Floating, pills and the three backgrounds, switched from the right-click card

The same with rounded corners:

Bar options, rounded corners

Recorded in a nested Hyprland with scripted pointer moves and real clicks.

  • Right-click empty bar space for a small PopupCard with three rows. Background shows the current look and steps through clear, glassy and opaque like a double-click on the bar (omarchy bar background cycle). Floating and Pills are switches. With pills on, Glassy gives frosted pills (Bar pills: an optional background per widget or run of widgets #13139). The card opens on press, so a slow right-click works too, and only off widgets (the gaps between pills count as empty, and so does the tray's closed drawer), so their own right-click actions stay. A second right press closes it. A right press during a left press or drag does nothing, and during a widget drag it is passed on, so the drag continues as in the base. Press-and-hold still moves the bar with the left button only.
  • omarchy bar pills <off|section|widget|toggle> and omarchy bar floating <true|false|toggle>, next to omarchy bar background. With no value they print what the running bar shows, theme defaults included (new IPC getters barPills and barFloating).
  • Appearance › Menu Bar gains Floating Bar and a Bar Pills submenu (No Pills, Pill per Section, Pill per Widget), checked from the running bar. Both commands are guard readers, so a menu batch runs each once.

Every switch writes the same shell.json keys the bar already reads. Pills turns back on to the last mode used since the shell started. The toggle commands ask the running bar over IPC like the transparency toggle, so they agree with the card, theme defaults included. With no shell or bar running they flip shell.json. If the shell does not answer in time they fail instead, since it may still act on the call and a second flip would undo it.

The card and menu strings have English catalog entries; the translations come from the sync workflow. manual/05-the-top-bar.md lists the right-click switches, the menu rows and the new commands.

The omarchy agent skill merges the floating and pills sections from #13138 and #13139 into one Bar Appearance section: the omarchy bar settings, the right-click switches and every theme key. SKILL.md gets an example, so "make my bar float with pills" maps to three commands.

Unchanged unless used

Nothing is drawn until you right-click empty bar space. The bar itself renders as on quattro (all four positions, opaque and clear background). 0 differing pixels, apart from an occasional 1 of 255 on one edge pixel of the weather icon. quattro shows the same pixel against an identical copy of itself, so it is render noise from the distance-field icons (#17003), not this PR.

Tests

config-test.sh: 8 cases for the new subcommands: the toggles with a running shell, without one, with no bar, and with a shell that does not answer, plus the no-value prints. menu-test.sh: the new rows' checked state, read from shell.json. menu-guards-test.sh passes with the new guard readers. After the rebase onto #6782, checked in a nested Hyprland: the IPC getters and toggles, and the card under a floating glassy bar with pills.


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 24, 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.

Verified (source review of the last commit, e084f68): the options card opens only when the right-click lands off a drawn widget slot on that bar surface, and widgets built on WidgetButton keep their own right-click actions. Press-and-hold and drag still move the bar with the left button only. The card, the CLI and the menu rows all write bar.transparent, bar.floating and bar.pills in shell.json, the keys the bar already reads. The card's switches reflect the effective state, including theme defaults, and no popup surface exists until the first right-click. The Hyprland 0.56 layer-rule example in the agent skill uses keys present in Hyprland v0.56.2.

Three items follow: one input issue, one consistency issue between the menu/CLI and the card, and one documentation gap.

A right-click held for 200 ms or longer does not open the card

CenterGestureArea now accepts Qt.RightButton but keeps pressAndHoldInterval: 200 and a connected onPressAndHold handler (shell/plugins/bar/Bar.qml:1841-1843, 1873-1878). For a right press, the handler returns early without setting mouse.accepted = false. In Qt's QQuickMouseArea (same logic in Qt Declarative 6.8.3, 6.9.3 and 6.11.2), an accepted press-and-hold leaves longPress set, and clicked is only emitted when longPress is false. openMenu() runs from onClicked, so it never runs.

right press on empty bar -> accepted (Left|Right) -> 200 ms press-and-hold timer starts
  released before 200 ms -> clicked(Right) -> openMenu()                   card opens
  held >= 200 ms         -> pressAndHold -> handler returns, event still accepted
                            -> longPress = true -> release -> no clicked -> no card

Impact: a deliberate or slow right-click on empty bar space does nothing, so the card appears to work only some of the time. Traced from source; not reproduced in a running session.

Suggested change: reject the event for a right-button hold on the gesture area itself, and keep the existing !gestureArea.pressed early return, which handles press-and-hold propagated from widgets:

onPressAndHold: function(mouse) {
  if (!gestureArea.pressed) return
  if (!(gestureArea.pressedButtons & Qt.LeftButton)) {
    mouse.accepted = false
    return
  }
  startDrag(mouse.x, mouse.y)
}

Opening the card on right-button press instead of click would also avoid it.

Menu rows and omarchy bar ... toggle behave differently from the card

Style > Menu Bar > Pills and Floating run omarchy-bar pills toggle and omarchy-bar floating toggle. Those jq programs read only shell.json (bin/omarchy-bar:230, 244), while the card works from the effective state and remembers the last pill mode:

Starting state Menu row or CLI toggle Card switch
bar.pills: "widget", toggled off then on ends in "section" ends in "widget"
No bar.floating, theme [bar] margin set (bar floats) first press writes true, no visible change first press turns floating off
No bar.pills, theme [bar] pills = "widget" first press writes "section", pills stay on first press turns pills off

Impact: anyone using widget pills loses that mode after an off/on cycle from the menu, and the new config-test.sh case asserts that widget -> off -> section sequence. With a user or community theme that enables floating or pills (no shipped theme sets these keys), the first menu press appears to do nothing or switches modes. The description's "Pills turns back on to the last mode in use" holds for the card, within the running shell session only: lastPillMode is in memory and starts as "section" after a restart.

Suggested change: route the menu rows, and optionally the CLI toggle, through the running bar the way toggleBarTransparency() in shell/shell.qml already calls shell.bar.toggleTransparency(), keeping the current jq path as the fallback when the shell is not running. Alternatively, document that toggle flips the shell.json value only and re-enables pills as section, and narrow the last-mode claim.

Documentation: manual/05-the-top-bar.md:83-95 still says Style > Menu Bar has "both position and transparency", does not mention right-clicking empty bar space, and does not list omarchy bar pills or omarchy bar floating. Its "A click-and-hold starts the same drag" could now say left-click-and-hold.


Review information

Test scope: Source review of pinned head e084f68cbfe49f0a6ae59d378bc533a30ead4a38 against quattro at 28ceaae70eba, focused on the last commit, with the carried floating and pills commits read where the new code depends on them. Upstream source read: Qt Declarative QQuickMouseArea (6.8.3, 6.9.3, 6.11.2), Quickshell v0.3.1 and Hyprland v0.56.2; installed versions were not checked. No repository code, tests or GUI were run, so input timing, popup placement and rendering were not observed, and the "0 differing pixels" claim was not independently measured.

AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments with targeted follow-up on single-source claims, 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, both confirmed.

  • The card now opens on right press, so a slow right-click works.
  • omarchy bar pills toggle and floating toggle ask the running bar over IPC, like the transparency toggle, so the menu rows and the card agree, theme defaults included. With no shell running they still flip shell.json. config-test.sh covers both. The description now says pills come back in the last mode used since the shell started.
  • manual/05-the-top-bar.md covers the right-click switches and the new commands.

@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.

Follow-up to the earlier review and the author's reply, checked at head 97118bab.

Verified: all three earlier findings are resolved at this head. No regression was found in the code changed since e084f68. Two small documentation gaps and one optional test note remain.

Earlier finding Status at 97118bab
Right-click held 200 ms or longer did not open the card Resolved: CenterGestureArea.onPressed opens the card on a right press (Bar.qml:1865), and onClicked no longer does
Menu rows and omarchy bar ... toggle disagreed with the card Resolved: toggle_in_shell calls the new toggleBarPills / toggleBarFloating IPC methods, which run the card's own togglePills() / toggleFloating()
manual/05-the-top-bar.md did not cover the new switches Resolved: the manual now describes the right-click switches, says "left click-and-hold", lists all four Style > Menu Bar items and adds both commands

Verified details:

  • Opening on press: press-and-hold still starts a move only with the left button, and double-click and release handling are unchanged. The card's HyprlandFocusGrab includes the bar window, and in Hyprland v0.56.2 a button press outside the grabbed surfaces clears the grab, but a release does not. So releasing the right button on the bar does not close a card opened on that press (traced from source, not observed in a running session).
  • IPC toggle: with a running bar, the three cases from the earlier table now match the card. Widget pills come back as widget after off/on within a session, and theme-default floating or pills turn off on the first press. Any answer other than ok falls back to the old shell.json flip and exits 0: no bar, a shell without the new method, not ready, not running, or a timeout. The description's "since the shell started" wording matches the code.
  • Other changes since e084f68: the BarModel.js helpers windowMargins and exclusiveZone compute the same values as the inline code they replace, and anchorOffset places the anchored centre widget where anchors.centerIn puts it without pills. KeyboardPanel.qml and notification placement reduce to the old values for a flush bar. The tray foreground is unchanged with pills off.

Documentation:

  • The IPC method table in docs/omarchy-shell.md:113-132 lists toggleBarTransparency but not toggleBarPills or toggleBarFloating, which omarchy bar pills|floating toggle now depend on.
  • shell/plugins/bar/README.md:19 still says "(or click-and-hold)" where the manual now says "left click-and-hold".

Optional test improvement: the press-and-hold guard check in test/shell.d/bar-test.sh:27 still passes when || !(gestureArea.pressedButtons & Qt.LeftButton) is removed from Bar.qml (checked with a modified copy), so the left-button-only rule is not under test. Adding a separate pressedButtons\s*&\s*Qt\.LeftButton term to that pattern would cover it.


Review information

Test scope: Follow-up review of head 97118bab6ff1315a655ff10442d166b68689e005 against the earlier head e084f68 and merge base 28ceaae: source review plus sandboxed test runs. bar-test.sh (175 checks) and menu-test.sh (123 checks) passed. config-test.sh needs a separate omarchy-pkgs checkout for an unrelated PKGBUILD block. With that block removed from a copy, it passed all 34 checks, including the 5 new cases. The IPC fallback was exercised with the real omarchy-bar and omarchy-shell against a stub qs, not a live shell. Upstream source read: Qt Declarative 6.11.2, Quickshell v0.3.1, Hyprland v0.56.2; installed versions were not checked. No GUI, Quickshell or Hyprland session was run, so input timing, popup placement and focus-grab behaviour were not observed.

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. The IPC table now lists toggleBarPills and toggleBarFloating, the README says "left click-and-hold", and bar-test.sh checks that only a left press-and-hold moves the bar.

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

  • A right press during a left press or drag no longer opens the card; it is ignored, as before. A second right press closes the card, and the gaps between pills count as empty bar space.
  • If the shell does not answer in time, the toggle commands now fail instead of flipping shell.json as well. The shell may still act on the call, and a second flip would undo it.

@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: A right press on empty bar space cancels a widget drag; all six findings of the earlier review are resolved at 1624a877.

A right press on empty bar space cancels a widget drag

During a widget drag, a right press on empty bar space reaches CenterGestureArea; onPressed returns early with the event accepted. Qt gives it the grab and cancels the widget's modulePointer, so the widget is not dropped. Impact: the reorder is lost, so the reply's "ignored" holds only for the bar's own press and move; at the merge base the drag continued. Reproduced in a Qt 6.11.2 model, not the shell.

Suggested change: in that early return, reject the press (mouse.accepted = false) unless the gesture area itself holds the left button.

Reproducer (standalone Qt model)

Standalone Qt Quick model, not the running shell. repro.qml holds the bar's empty-space gesture area with onPressed copied as written from CenterGestureArea in shell/plugins/bar/Bar.qml at 1624a877 (comments dropped; a script compared the two blocks textually before the run). Over it sits one widget slot whose MouseArea takes only the left button, as ModuleSlot's modulePointer does. repro.cpp drives it through QTest's QWindow mouse functions, which keep the held-button state, so the right press arrives with the left button still held.

Run with Qt 6.11.2 (qt6-base 6.11.2-3, qt6-declarative 6.11.2-1), offscreen.

repro.qml:

import QtQuick

// The bar's empty-space gesture area (CenterGestureArea in
// shell/plugins/bar/Bar.qml at 1624a877, onPressed copied as written;
// openMenu stands in for a press on empty bar space) under one widget slot,
// whose modulePointer takes only the left button, as ModuleSlot's does.
Item {
  id: root
  width: 600
  height: 30
  property int widgetDragCancels: 0
  property int widgetDrops: 0

  MouseArea {
    id: gestureArea
    anchors.fill: parent
    acceptedButtons: Qt.LeftButton | Qt.RightButton
    property bool dragging: false
    property bool suppressClick: false
    property real pressedX: 0
    property real pressedY: 0
    property bool menuOpen: false
    function openMenu(x, y) { menuOpen = true; return true }

    onPressed: function(mouse) {
      if (mouse.button === Qt.RightButton) {
        if (dragging || (mouse.buttons & Qt.LeftButton)) return
        if (menuOpen) menuOpen = false
        else if (!openMenu(mouse.x, mouse.y)) mouse.accepted = false
        return
      }
      menuOpen = false
      dragging = false
      suppressClick = false
      pressedX = mouse.x
      pressedY = mouse.y
    }
  }

  // A widget slot's modulePointer: fills the slot, left button only.
  MouseArea {
    x: 200
    width: 60
    height: 30
    acceptedButtons: Qt.LeftButton
    property bool dragging: false
    onPositionChanged: dragging = true
    onReleased: if (dragging) root.widgetDrops++
    onCanceled: root.widgetDragCancels++
  }
}

repro.cpp:

// Build: g++ -std=c++17 -fPIC repro.cpp -o repro $(pkg-config --cflags --libs Qt6Quick Qt6Test)
// Run:   QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software ./repro repro.qml
// QTest's QWindow mouse functions keep the held-button state, so the right
// press arrives with the left button still held, as from a real mouse.
#include <QGuiApplication>
#include <QQuickItem>
#include <QQuickView>
#include <QtTest/QTest>
#include <cstdio>

int main(int argc, char **argv)
{
  QGuiApplication app(argc, argv);
  QQuickView view(QUrl::fromLocalFile(QString::fromLocal8Bit(argv[1])));
  view.resize(600, 30);
  view.show();
  if (!QTest::qWaitForWindowExposed(&view)) return 1;
  QObject *root = view.rootObject();

  // Drag a widget left, over empty bar space, and press the right button
  // there before letting go of the left one.
  QTest::mousePress(&view, Qt::LeftButton, {}, QPoint(230, 15));
  QTest::mouseMove(&view, QPoint(225, 15));
  QTest::mouseMove(&view, QPoint(100, 15));
  QTest::mousePress(&view, Qt::RightButton, {}, QPoint(100, 15));
  QTest::mouseRelease(&view, Qt::RightButton, {}, QPoint(100, 15));
  QTest::mouseRelease(&view, Qt::LeftButton, {}, QPoint(100, 15));

  std::printf("widget drag cancelled: %d, widget dropped: %d\n",
              root->property("widgetDragCancels").toInt(),
              root->property("widgetDrops").toInt());
  return 0;
}

Actual output, repro.qml as above (head behaviour):

widget drag cancelled: 1, widget dropped: 0

Actual output with the gesture area's acceptedButtons: Qt.LeftButton (as at the merge base, before the right-click menu):

widget drag cancelled: 0, widget dropped: 1

Actual output with the suggested guard (the only change to repro.qml):

        if (dragging || (mouse.buttons & Qt.LeftButton)) {
          if (!(gestureArea.pressedButtons & Qt.LeftButton)) mouse.accepted = false
          return
        }
widget drag cancelled: 0, widget dropped: 1

Why: the right press is delivered to the gesture area by hit-testing. onPressed returns with the event accepted, and Qt makes the accepting item the exclusive grabber of the mouse point (QQuickDeliveryAgentPrivate::deliverMatchingPointsToItem, setExclusiveGrabber), which cancels the previous grabber, the widget slot's modulePointer, so onCanceled runs (Bar.qml modulePointer.onCanceled calls root.clearBarDrag()). When the gesture area itself holds the left press (a bar move), the grabber does not change and nothing is cancelled.

Details

In a larger Qt model of CenterGestureArea, the guard shown in the reproducer leaves the bar-move and card cases unchanged. The regex at bar-test.sh:47 would need updating.

Verified:

  • pills|floating toggle with the real omarchy-bar and omarchy-shell against a qs stand-in: no-bar, a shell without the method, not ready and not running flip shell.json and exit 0; a timeout exits 1 and leaves it unchanged (floating toggle run for ok, no-bar and timeout).
  • In the Qt model, a left press-and-hold followed by a right press keeps the card closed and finishes the move on the left release (at 97118bab it opened the card and left the move unfinished). A second right press closes the card.
  • Removing the left-button term from onPressAndHold now fails bar-test.sh; at 97118bab the same mutation passed.
  • PanelGeometry.js and the notification barClearance give the same values as the inline code they replace for a flush bar.

Optional notes:

  • toggle_in_shell reports every other omarchy-shell failure, for example Too many arguments provided after a CLI/shell version mismatch, as "did not answer in time". The command still fails without touching shell.json; matching *"is not responding"* for the timeout message and using the bar did not toggle: $result otherwise would name the real cause.
  • The onPressed comment says Qt cancels the move on a right press during a left press; on empty bar space the move actually carries on to the left release.

Related open PRs: #13569 adds the same bar.floating key and omarchy bar floating command with a different inset (one full gaps_out), and #13570 uses the layout "group" key to draw ovals, where this PR uses a "group" change to split pill runs.


Review information

Test scope: Source and sandboxed tests at 1624a877, plus a Qt model of the bar input; no live shell or GUI session.

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, confirmed and fixed. I checked it with a small Qt 6.11.2 harness that sends real two-button events. With the previous head, a right press on empty bar space during a widget drag took the grab and cancelled the drag. Now the gesture area passes that press on unless it holds the left button itself, so a widget drag continues as in the base, and the bar's own move is still not stranded. My earlier "ignored, as before" only held for the bar's own move.

@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 were confirmed.

Summary

Adds one place to change the bar background, floating state, and pills through a right-click card, commands, and menu rows.

  • The bar’s right-click card switches its background, floating position, and widget pills.
  • Bar commands and the Appearance menu now switch floating and pills.

Previous thread decisions:

  • The retained reservation finding was withdrawn as incorrect.
  • cristian-fleischer accepted keeping the card open for plain widget clicks because other bar popups behave the same way.
  • cristian-fleischer accepted preserving low pill opacity because the glassy bar also honors a theme’s explicit opacity.
  • cristian-fleischer accepted theme text on glassy pills because they share the glassy bar’s tint and blurred backdrop; pill-text remains available.

This review inspected code paths; it did not run tests or capture the UI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Card[Right-click card] --> Bar[Running bar]
  CLI[Bar commands] --> IPC[Shell IPC]
  IPC --> Bar
  Bar --> Config[shell.json]
  Menu[Appearance menu] --> CLI
  Config --> Look[Background, floating, and pills]
  Theme[Theme defaults] --> Look
Loading

Reviews (16) · Last reviewed commit: "Merge remote-tracking branch 'origin/qua..." · Reviewed by Greptile

Comment thread shell/plugins/bar/Bar.qml Resolved
Comment thread shell/plugins/bar/Bar.qml Resolved
@cristian-fleischer
cristian-fleischer force-pushed the bar/4-bar-options branch 2 times, most recently from b736db1 to e792ae2 Compare October 5, 2026 09:05
@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

Heads-up for the rebase: #14553 (merged today) qualifies palette references as Commons.Color, because Qt 6.12's QtQuick Color type shadows the bare singleton. This branch adds about 14 bare Color. references in shell/plugins/bar/Bar.qml (Color.pick("bar.pills", ""), Color.bar.pill.a, …) and one in widgets/Tray.qml. They need to become Commons.Color.…. Since this stacks on #13138/#13139, it probably makes sense to rebase those first.

@cristian-fleischer

Copy link
Copy Markdown
Author

Thanks for the heads-up @jandrusk. I'll switch these to Commons.Color in the port onto the reworked bar.

@cristian-fleischer

Copy link
Copy Markdown
Author

Rebased. The card's Background row now steps through clear, glassy and opaque, the menu rows moved to Appearance › Menu Bar, and omarchy bar pills / floating print the current state with no value.

Comment thread shell/plugins/bar/Bar.qml Resolved
Comment thread shell/plugins/bar/Bar.qml Resolved
@omarchybot omarchybot removed the enhancement New feature or request label Oct 16, 2026
Comment thread shell/shell.qml Resolved
Comment thread docs/omarchy-shell.md Resolved
Comment thread test/shell.d/bar-test.sh Resolved
Comment thread test/shell.d/menu-test.sh Resolved
@cristian-fleischer
cristian-fleischer force-pushed the bar/4-bar-options branch 2 times, most recently from b6ee5a3 to 7259a71 Compare October 26, 2026 08:58
Comment thread docs/omarchy-shell.md Resolved
@cristian-fleischer
cristian-fleischer force-pushed the bar/4-bar-options branch 3 times, most recently from 434f1da to 69996be Compare October 29, 2026 14:55
Comment thread shell/plugins/bar/Bar.qml Resolved
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 11 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>
bar.pills in shell.json (off, section, widget), or [bar] pills as a theme
default, gives widgets their own background so the bar background can be
switched off. Off by default: without it the bar renders as before.

- section joins neighbouring widgets into one pill; a spacer, even at
  size 0, or a change of "group" between neighbours ends it. widget gives
  every widget its own. "pill": false keeps an entry off pills.
- Roles are a port of DMS's SegmentRoles: hidden widgets drop out of a
  run without breaking it, so a widget that hides needs no rebuild.
- The first slot of a pill draws the whole pill. Per-slot segments meet
  at fractional pixels on scaled outputs and show a seam.
- Text is picked against the pill; omarchy-bar-text-color --blend
  composites a translucent pill over the sampled strip.
- On an opaque bar the pill is the bar text at 10% so it shows; on a
  clear bar it is the bar colour. On a glassy bar the pills take the
  glass and the strip is not drawn, so Omarchy's blur falls on the pills
  alone. A theme's [bar] pill wins.
- Theme keys: pill, pill-alpha, pill-text, pill-border(-alpha),
  pill-radius, pill-inset, pill-padding, pill-gap, all optional, with
  commented examples in the theme template.
- Every section list draws its own pills, so centerBegin, center and
  centerEnd each get theirs. The tray's drawer sits inside the tray's
  pill and draws none. The pill size keys join the [bar] allowlist.
- A bare widget at a section end keeps the stock end margin.
- Tray icons on the bar follow the pill text colour; the tray popups sit
  on the popup background and keep the theme text. Bar widgets outside
  the shell see bar.pillsOn, so a cloned tray does the same.
- An odd pill-gap splits so that neighbouring pills are exactly pill-gap
  apart, and pill-gap and pill-padding keep a deliberate 0.
- Dragging the first widget of a pill keeps the pill under its
  neighbours, and the drag ghost stays under the pointer and sits on
  the pill colour, so it shows in the pill text colour. Once the
  dragged widget's room moves away, no empty pill stays behind.
- The omarchy agent skill explains pills and their theme keys
  (plugins.md), and blur behind pills on a clear bar as a layer rule
  with ignore_alpha (hyprland.md).

Border and theme-template examples after omacom#7251.

Co-Authored-By: Saco Song <threesking@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Slots sit at the top of a horizontal section, so a pill centered on its
first slot sat high when that widget was shorter than the bar: a 16 px
widget lifted the pill by 5 px and clipped it at the bar's edge. The
pill now measures across the section, which is centered in the bar. A
vertical bar's pill takes the section's width the same way, so a narrow
first widget no longer narrows the pill for the rest of the run. Stock
widgets are all bar-sized and render as before.

Co-Authored-By: Claude <noreply@anthropic.com>
A refresh that came in while omarchy-bar-text-color was still sampling
was dropped unless pills were involved. Moving the bar or switching
floating on a clear bar mid-sample left the text color picked for the old
strip until something else asked again. Every such refresh now runs once
the current sample is in.

Co-Authored-By: Claude <noreply@anthropic.com>
A widget pulled off the bar keeps its layout entry until its poof has
played, about 620 ms. Its slot already closes (alongLength is 0), but it
still counted as drawn, so in widget mode an empty pill and its padding
stayed behind for the length of the poof. A slot pending removal now
leaves its pill at once.

Co-Authored-By: Claude <noreply@anthropic.com>
…menu rows

One place to switch the bar background, floating and pills:

- Right-click empty bar space for a small PopupCard with three rows.
  Background shows opaque, glassy or clear and steps through them like a
  double-click; Floating and Pills are switches. The card opens on press,
  so a slow right-click works too, and only off widgets (the gaps between
  pills count as empty), so their own right-click actions stay. A second
  right press closes it.
  A right press during a left press or drag does nothing, and during a
  widget drag it is passed on, so the drag continues.
  Press-and-hold still moves the bar with the left button only.
- omarchy bar pills <off|section|widget|toggle> and
  omarchy bar floating <true|false|toggle>, next to background. With no
  value they print what the running bar shows, theme defaults included.
- Appearance > Menu Bar gains Floating Bar and a Bar Pills submenu (No
  Pills, Pill per Section, Pill per Widget), checked from the running bar.

Pills turns back on to the last mode used since the shell started. The
toggle commands, and so the menu rows, ask the running bar, so they start
from what it shows, theme defaults included; with no shell or bar they
flip shell.json. When the shell does not answer in time they fail, since
it may still act on the call and a second flip would undo it. Every
switch writes the same shell.json keys the bar already reads.

The card and menu strings have English catalog entries; translations
follow through the sync workflow.

The manual's top bar page lists the right-click switches and the new
commands.

The omarchy agent skill now describes the bar in one Bar Appearance
section: the omarchy bar settings, the right-click switches, and every
theme key, plus a "float the bar with pills" example in SKILL.md.

Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts:
#	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.

5 participants