Explain which menu bar items can be hidden

Hiding other apps' icons worked, but Apple pins Spotlight, Clock, Battery
and Control Center to the right of the menu bar, so a third-party item can
never be placed after them to push them away. Document the real limit so
the behaviour is not mistaken for a bug.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4.1-flash
This commit is contained in:
2026-09-27 00:35:05 +08:00
parent 8767b73234
commit 92a57308b7
6 changed files with 46 additions and 7 deletions
+13
View File
@@ -112,6 +112,19 @@ no control over this, so the app creates its own `NSStatusItem` and:
`/tmp/simpletopbar-items.txt`; use it to verify the icon is not under the notch
(x should be ~1200, not ~765).
## Hiding other menu bar items
`MenuBarHider` creates a zero-width spacer `NSStatusItem` at launch and grows its
length to `hiddenLength` (10_000) to push the icons on its left off-screen.
Verified with `--diag-hide`:
- All third-party apps' icons go to x < 0 (cmux, Kapture, moomoo, WireGuard,
TextInputMenuAgent, Now Playing) and so does Wi-Fi.
- **Spotlight, Clock, Battery and Control Center stay**: macOS pins them to the
far right, and a third-party item can never be inserted to their right, so the
spacer has nothing to push them with. Do not try to "fix" this; it is a macOS
constraint, not a bug.
## Gotchas
- `AppListModel` is `@MainActor`; the `NSWorkspace` observers hop back with