Files
simpletopbar/README.md
T
TZGyn 9b5031aff2 Document the upgrade steps and always print them after a release
Readers and future sessions need one obvious place that says how to move
an installed app to the latest version, and the release flow now requires
surfacing those commands in every release report.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4.1-flash
2026-09-26 23:05:12 +08:00

82 lines
3.1 KiB
Markdown

# SimpleTopBar
A native macOS menu bar app: a **hamburger menu** in the menu bar whose panel
collects every other app's menu bar (tray) icons, plus every app running on your
Mac, into three sections:
- **Menu Bar** — a tray of all other apps' menu bar items, discovered through
the Accessibility API. Click one to open its real menu. Optionally **hide the
items from the menu bar** so they only live inside this panel (best-effort;
see below).
- **Apps** — regular apps that live in the Dock.
- **Background Apps** — accessory/agent apps without a Dock icon. This section
is a **dropdown**: it stays collapsed to a single header, and when you expand
it only the first few apps are shown. The rest are hidden behind a
**Show N more** row so the list never overflows the panel.
Click any row to activate the app, or right-click for Activate / Hide / Quit.
## Accessibility permission
Collecting and opening other apps' menu bar items needs **Accessibility**
permission (System Settings → Privacy & Security → Accessibility). The panel
prompts for it; without it the Menu Bar section is empty and everything else
still works.
## Hiding menu bar items (best-effort)
macOS has no public API to move another app's status item. The **Hide items from
the menu bar** toggle uses the spacer technique: a zero-width status item is
created at launch whose length is expanded to push the items to its left
off-screen. This is reliable only when SimpleTopBar starts at login (its spacer
then sits to the right of later-launched apps' items) and may need re-toggling
after items move around. It is off by default and always undone on quit; if the
app dies, macOS removes the spacer automatically.
## Install with Homebrew
```bash
brew tap TZGyn/tap https://gitea.tzgyn.dev/TZGyn/homebrew-tap.git
brew trust TZGyn/tap
brew install --cask simpletopbar
```
The tap is hosted on Gitea, so the full URL is required. Homebrew may print an
"Unsupported tap" warning — it's harmless.
## Upgrade
```bash
brew update
brew upgrade --cask simpletopbar
```
If Gatekeeper still blocks the app after upgrading (it is not notarized yet):
```bash
xattr -dr com.apple.quarantine /Applications/SimpleTopBar.app
```
## Build from source
```bash
swift build # debug build
swift run SimpleTopBar # run from terminal (app appears in the menu bar)
swift run SimpleTopBar --self-test # headless check of the dropdown logic
./build-app.sh 0.2.0 # release build + SimpleTopBar.app bundle + icon + codesign
./release.sh 0.2.0 # build-app.sh + dist/SimpleTopBar.zip + sha256
```
## Around the Background dropdown
The background section is collapsed by default. Expanding it reveals
`AppListModel.backgroundPageSize` (5) apps at a time; when more are running a
**Show N more** button reveals the next page. Collapsing resets the page.
## Releases
`./release.sh <version>` builds and zips the app to `dist/SimpleTopBar.zip` and
prints its sha256. Tag `v<version>`, attach the zip to a release on the Gitea
repo, and bump `version`/`sha256` in the cask in
[TZGyn/homebrew-tap](https://gitea.tzgyn.dev/TZGyn/homebrew-tap).