Repository navigation
fix: show the right icons in the Menu bar items row - #325
Merged
Merged
Conversation
M4n0x
enabled auto-merge
October 26, 2026 10:48
Wi-Fi, Bluetooth, Focus and Control Center's other items now get a symbol like their menu bar glyph, as Battery and Clock did. SF Symbols has no Bluetooth rune, so it is drawn. A system agent without an icon, such as the input menu's, shows a menu bar symbol instead of macOS's blank app icon, and a helper inside an app shows that app's icon. App icons are drawn from their Retina art, so a 1× display no longer picks Docker Desktop's broken 16, 32 and 48 px images. Fixes #323
M4n0x
force-pushed
the
fix/menu-bar-items-icons
branch
from
October 26, 2026 11:02
a605995 to
a9d1d32
Compare
|
🎉 This PR is included in version 0.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Menu bar items row shows the wrong icon for several items. Items that system agents draw, such as the input menu, show macOS's blank app icon. Wi-Fi, Bluetooth, Focus and Control Center's other items all show Control Center's icon. On a 1× display, Docker Desktop's icon is colored noise. Fixes #323.
Changes
All in
Sources/StableBar/AppMenu.swift, through a newmenuBarIcon(identifier:app:):menuBarSymbolsnow covers everycom.apple.menuextra.*identifier in ControlCenter's and SystemUIServer's binaries, plus the input menu (com.apple.menuextra.textinput, or TextInputMenuAgent's bundle ID). Each gets a symbol like its menu bar glyph: Wi-Fi, Focus, Sound, Display, Now Playing, Screen Mirroring, AirDrop, Time Machine, VPN and others. SF Symbols has no Bluetooth rune, so Bluetooth's is drawn as a template image. A symbol missing on an older macOS falls back to the app's icon instead of crashing.iconBundle(containing:)uses the process's own app when itsInfo.plistdeclares an icon (CFBundleIconFile,CFBundleIconNameorCFBundleIcons), otherwise the nearest app around it that does, as for a helper or daemon inside an app. A system agent with neither showsmenubar.rectangleinstead of the blank placeholder.icon.icnshas noise in its 1× 16, 32 and 48 px images; its@2xand larger ones are fine.retinaArt(of:)always takes the icon's 18 pt@2xart, which a 1× display scales down, so a Retina display draws what it drew before.The live images of #83 aren't an option: while StableBar hides the menu bar, neither ScreenCaptureKit nor
CGWindowListCreateImagereturns an image of the items' windows.Testing
iconBundlefinds the app around a helper and an unbundled daemon, and returns nothing for an agent without an icon.menuBarIcongives Wi-Fi its symbol, Bluetooth its rune and an agent without an iconmenubar.rectangle, and draws an app icon from 36 px art.menuBarSymbolsis a system symbol.retinaArt.swift teston this branch rebased onmain(with feat: open the Menu bar items row on hover #321): 294 XCTest and 463 Swift Testing tests pass.main) and after. From the left: Docker Desktop, Tailscale, Amphetamine, AeroSpace, Raycast, Shottr, JetBrains Toolbox, Bluetooth, Focus, Battery, Wi-Fi, the input menu, Spotlight, Control Center and Clock. The 1× images are doubled pixel for pixel.1×, before
1×, after
2×, before
2×, after: the app icons match the 2× before.
com.apple.menuextra.*identifiers for Wi-Fi, Bluetooth and Focus come from Control Center's binary. They follow the scheme of the Battery, Clock and Control Center identifiers that feat: open Control Center and the macOS menu bar's items from the bar #311 tried live.git diff --checkand commitlint pass.Merging
A merge commit or rebase merge, which keeps the one commit. As a
fix, it makes a patch release.Claude Opus 5.5 via Claude Code