Swift MIT

MenuBarHider

Hide menu bar icons on macOS 27. Two separators, one click, no Screen Recording.

H

happy666End

Dernière activité 26 sept. 2026
happy666End/MenuBarHider

177

étoiles

0

forks

0

issues ouvertes

hidden-barmacosmacos-27menu-barmenubarswift

Ce README est souvent en anglais.

MenuBarHider

macOS 27 Swift 5 MIT

Expanded, collapsed, expanded again

MenuBarHider hides menu bar icons on macOS 27, where Hidden Bar, Ice and most other managers stopped working. Two separators live in your menu bar: everything between | and » is hidden, one click on » brings it back, and it folds away again after a timeout.

  [always visible]  |  [hidden]  »  [always visible]      expanded
  [always visible]  »  [always visible]                    collapsed

No Screen Recording permission, no screenshots of your menu bar, no telemetry. Accessibility permission only.

Why another one

macOS 27 rewrote the menu bar: every status item used to be its own window, now the whole bar is one window drawn by MenuBarAgent. Tools that inflated a status item's width (Hidden Bar) or dragged item windows off screen (Ice, old Bartender) became no-ops overnight. MenuBarHider talks to MenuBarAgent directly, the same way the paid managers that survived do, but it is small, open and free.

Install

Requires macOS 27. Download MenuBarHider-x.y.z.dmg from the latest release, open it and drag MenuBarHider.app onto Applications (a .zip is there too). The app is signed with a Developer ID and notarized, so it opens without Gatekeeper warnings.

The app has to run from Applications: macOS hides the icons of apps started anywhere else, MenuBarHider's own » included. If you launch it from the disk image or Downloads, it offers to move itself to Applications and hides nothing until then.

On first launch grant Accessibility in System Settings → Privacy & Security → Accessibility. The app picks it up within two seconds, no restart needed.

Build from source

Needs Xcode 26.3 or newer and xcodegen.

brew install xcodegen
git clone https://github.com/happy666End/MenuBarHider.git
cd MenuBarHider
make install        # builds Release, copies to /Applications, launches

The default build is ad-hoc signed, which works everywhere but has one drawback: every rebuild produces a new signature and macOS forgets the Accessibility grant. If you have an Apple developer certificate, sign with it so the grant survives rebuilds:

make install SIGN_IDENTITY="Developer ID Application" TEAM=XXXXXXXXXX
# or put those two lines into local.mk (git-ignored) once

Use

  1. ⌘-drag the » separator to the right of the icons you want to hide.
  2. Click » to reveal them, click again to hide, or wait for the auto-hide timer.
  3. While expanded, a second separator | appears. ⌘-drag it right past any icon that should stay visible even though it sits left of ».

Right-click either separator for the menu:

Item What it does
Show Hidden Items / Hide Items Same as a left click
Rescan Layout Re-read which icons sit between | and »
Auto-hide After Never, 5 s, 10 s, 30 s, 1 min
Launch at Login Registers with SMAppService

The hidden set is recomputed every time the bar collapses, so reordering icons while it is expanded just works. Apps launched while the bar is collapsed stay visible until you move them behind the separator.

How it works

flowchart LR
    AX[Accessibility<br/>item positions] --> HC[HidingController]
    SEP["| and » positions"] --> HC
    HC -->|allow-list| BR[MenuBarAgentBridge]
    BR -->|MBAssessmentModeAssertion| MBA[MenuBarAgent]
    MBA --> BAR[(menu bar)]
Loading
  • Hiding. MenuBarAgent exposes a visibility-restriction service: "show only these system items and these bundle identifiers". Its client lives in the private MenuBarClientCore.framework as MBAssessmentModeAssertion, and it is the one service there that requires no entitlement. The app loads the framework with dlopen, builds an allow-list of every running app minus the hidden ones, and activates the assertion. Releasing it restores the bar instantly.
  • Which icons. Positions of third-party items come from each app's AXExtrasMenuBar; the separators are the app's own NSStatusItems. The scan runs concurrently across apps and takes about 100 ms.
  • Time Machine, VPN and other Apple menu extras. They are plugins loaded into SystemUIServer, and MenuBarAgent attributes all of them to that one bundle identifier, so the allow-list cannot hide one without the others. Instead the app unloads each extra that sits between the separators through the private CoreMenuExtra calls in HIServices and loads it back on expand. SystemUIServer lists its items in load order without identifiers, and that order is how they are told apart.
  • Degradation. If Apple removes the framework or the class, the menu says Hiding unavailable on this macOS build and nothing else changes.

The Notification Center catch

The restriction is what macOS uses for exam (assessment) mode, and that mode deliberately blocks Notification Center. With the restriction active a click on the clock does nothing: BetterTouchTool has exactly this bug open. MenuBarHider lifts the restriction while the pointer hovers the clock and puts it back half a second after the pointer leaves. An already-open panel survives the restriction, so widgets keep working; the price is that hidden icons show while the cursor sits on the clock.

Caveats

  • Private API. Apple can close it in any 27.x update; the app will report it instead of crashing, but hiding will stop until a workaround exists.
  • Items without a bundle identifier cannot be allow-listed and stay hidden whenever the bar is collapsed. Items from apps launched outside /Applications, including ~/Applications, stay hidden too, because MenuBarAgent ignores their allow-list entries.
  • A collapsed Apple menu extra is really unloaded, so System Settings shows it as off until the bar expands. The app reloads it on quit and on the next launch after a crash; if you delete the app while the bar is collapsed, turn the extra back on in System Settings.
  • Multi-display setups are untested; the separators are measured on the primary display.

Development

make gen      # xcodegen generate (project.pbxproj is not committed)
make test     # unit tests for the pure logic
make lint     # swiftlint + swift-format, configs are in the repo
make build    # Release build into build/
make release  # signed + notarized zip in dist/ (needs TEAM and a notarytool profile)

License

MIT

Projets similaires

An ultra-light MacOS utility that helps hide menu bar icons

Swiftmacosswiftutilities
Ddwarvesf
15 k étoiles510

Powerful macOS menu bar customization tool

Swiftmacosproductivityscripting
Sswiftbar
4,6 k étoiles137

The open source menu bar manager

Swiftmacosmacos-appmenu-bar
Tthaw-app
11,6 k étoiles285