Skip to content

feat: show chosen menu bar items on the bar and hide others from the row - #356

Merged
Seb-GRAF merged 4 commits into
mainfrom
feat/355-menu-bar-items-shown
Oct 28, 2026
Merged

Seb-GRAF merged 4 commits into
mainfrom
feat/355-menu-bar-items-shown

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The Menu bar items widget keeps every macOS menu bar item behind its grid symbol. An app used all day, such as Granola, takes two steps to open, and items nobody uses crowd the row. Fixes #355.

Changes

  • Configuration. menuBarItems widgets take shown and hidden, lists of { "app", "item", "icon" }. app is a bundle ID or app name and covers every item of that app; item, an Accessibility identifier or title, names one item of an app that has several. The entry "symbol" places the widget's grid symbol among the items in shown, or leaves it out in hidden; without it, the symbol comes last. The schema gets a menuBarItem definition, and resetting the widget clears both lists.
  • Bar. Shown items sit beside the grid symbol in the listed order, each its own button, highlighted like App menus' titles. A click opens the item's menu below it, or presses it as the row does for items with their own panel (Control Center, Battery, Clock). While a clicked-open menu or row is open, moving to another shown item or to the grid switches to it. A row opened on hover doesn't switch, so passing over shown items on the way out opens nothing; WidgetPopup.pinned is now readable to tell the two apart. Resting on an item shows its name. icon replaces an item's icon with an SF Symbol. Icons are sized by height, so wide glyphs such as Battery keep their shape.
  • Panels. An item that opens its own panel, such as Control Center, acts on mouse down, as the Control Center widget does. Clicking it while the panel it opened is still showing does nothing more, so the click that closes the panel doesn't reopen it. showsPanel now counts only windows above layer 0 (Control Center's panels sit at layer 2005), so an app's own main window isn't mistaken for its panel. While StableBar shows the hidden menu bar to press an item, it keeps the items it has instead of reading them again: Control Center doesn't answer within the 100 ms timeout while its panel opens, and its items dropped off the bar until the next read.
  • Row. The grid symbol's row leaves out shown and hidden items. Right-clicking an icon offers Show on Bar and Hide.
  • Reading items. AppMenu.readMenuBarItems keeps the items in menuBarItems, which the bar, the row and Settings share. When a bar shows items, StableBar reads them when the configuration loads, when an app quits, 1 and 6 seconds after an app launches (apps add their items after launching), and when the pointer enters the widget.
  • Settings. Content → Menu bar items draws the items as icons in three strips: On the bar, in order with the grid symbol among them, as on the bar; In the row, in menu bar order; and Hidden. The grid symbol drags like an item, within On the bar or into Hidden, and selecting it sets its SF Symbol, which replaces the widget's separate Icon group. Drag an icon to another strip, or within On the bar to reorder it, and a line marks where it goes. Selecting an icon shows its name and app, a Bar / Row / Hidden choice and, for an item on the bar, its SF Symbol. An item whose app isn't running stays in its strip, dimmed, so it can still be moved or removed. The drag uses SwiftUI's draggable and dropDestination, since it stays inside one view.
  • One move for every surface. menuBarItemsProperties(moving:to:before:) moves an item from the row, or a reference from shown or hidden, to a strip, optionally before a given reference. Settings, the bar's and the row's right-click menus (MenuBarItemCommands: Move Left, Move Right, Show on Bar, Move to Row, Hide) all go through it. Edits use ConfigurationEdit .set, so a change lands in the widget's layer with Undo, and only the lists that change are written.
  • Docs. "Items on the bar" in docs/widgets.md.

Testing

  • swift test: all 295 XCTest tests pass. Swift Testing passes 527 of 532; the other 5 are the unchangedApp… release tests, which fail the same way on main on this Mac.
  • New menuBarItemsPutTheirSymbolLastUnlessPlacedOrHidden covers where the symbol goes with and without a "symbol" entry, and that other strings are rejected.
  • New menuBarItemsGoWhereTheirReferencesPutThem covers moving the symbol to the front and into hidden, and matching by bundle ID, name, identifier and title, the order of shown items, the reference written for an item (with item only when its app has several items), inserting at a position, reordering left and right, keeping a symbol when an item moves to Hidden, and that moving an item to where it already is changes nothing.
  • Drew the bar, the row and the Settings inspector offscreen from this Mac's real menu bar, main before and this branch after, with CodexBar, Amphetamine and Battery on the bar and PixelSnap 2 and CleanMyMac hidden.
  • Not checked on a live bar: clicks, switching between menus, the right-click menus (the row's lives in a non-activating panel), dragging in Settings, updates when apps launch and quit, and several displays. The Settings screenshot was drawn with CodexBar selected and Granola, which isn't running here, on the bar.

Drawn offscreen at 2×, dark appearance. The bar is cropped to its right end.

Before (main) After
Bar bar-before bar-after
Row row-before row-after
Settings → Bar → Content settings-before settings-after

Merging

Squash: the later commits rework the first one's Settings, so one changelog entry fits.

Claude Opus 5.5 via Claude Code (T3 Code)

@Seb-GRAF
Seb-GRAF enabled auto-merge (squash) October 28, 2026 09:59
@Seb-GRAF
Seb-GRAF merged commit 607810c into main Oct 28, 2026
8 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/355-menu-bar-items-shown branch October 28, 2026 10:02
stablebar-releases Bot pushed a commit that referenced this pull request Oct 29, 2026
## [0.9.0](v0.8.0...v0.9.0) (2026-10-29)

### Features

* choose the preset and theme in one setup step ([96e07e2](96e07e2))
* copy a bug report with versions, displays, access and crashes ([0f61497](0f61497)), closes [#93](#93)
* end setup's intro on the person's own bar ([30817a3](30817a3))
* end setup's presets with sound, battery, the clock and menu bar items ([9369eff](9369eff))
* fill setup's presets with sound, battery and menu bar items ([b641296](b641296))
* install and update StableBar with Homebrew ([490010e](490010e))
* keep seven iconic themes in the theme gallery ([7087aa1](7087aa1)), closes [#370](#370)
* load configurations written for a newer StableBar ([5ed7094](5ed7094))
* open setup with a line of light that becomes the demo's glass bar ([d58adb7](d58adb7))
* open widget settings from the bar on Content ([c441cd0](c441cd0))
* show chosen menu bar items on the bar and hide others from the row ([#356](#356)) ([607810c](607810c))
* show each setup preset's widgets and theme ([12a7284](12a7284))
* show StableBar's crashes in Settings and copy them into a bug report ([d1c127d](d1c127d)), closes [#333](#333)
* turn the macOS menu bar's auto-hide on or off from Settings ([2e79f5c](2e79f5c)), closes [#210](#210)
* uninstall StableBar and turn off the menu bar auto-hide it turned on ([9f3706b](9f3706b)), closes [#332](#332)

### Bug Fixes

* drag and click widgets on every display while editing the bar in place ([4c93398](4c93398))
* find tools on the login shell's PATH when the shell is slow at login ([18723df](18723df)), closes [#362](#362)
* hide the app menus warning while setup is open ([0b521c1](0b521c1))
* inset Léman's focused workspace and draw Catppuccin's as a pill ([7206852](7206852)), closes [#370](#370)
* keep clicks on the bar from showing the menu bar on macOS 27 ([4ff45b9](4ff45b9)), closes [#366](#366)
* keep hover popups open while moving toward them ([0fe1fed](0fe1fed))
* keep the menu bar reveal delay working on macOS 27 ([86f6f30](86f6f30)), closes [#367](#367)
* land a dropped widget in its slot without the bar jumping ([d23917c](d23917c))
* prevent command cancellation deadlocks and flaky test failures ([48e128b](48e128b))
* put the bar back above the menu bar strip after the screen locks ([a934459](a934459)), closes [#374](#374)
* show the menu bar's items in Menu bar items on macOS 27 ([4a00c35](4a00c35)), closes [#372](#372)

### Performance Improvements

* bounce the equalizer without updating the bar every frame ([756795a](756795a))
* keep the bar moving while a widget move saves ([033e5aa](033e5aa))
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Choose which menu bar items show on the bar and which stay in Menu bar items

1 participant