Skip to content

Monochrome menu bar icon, click-to-open, real .app bundle - #10

Merged
syscod3 merged 1 commit into
mainfrom
feat/tray-app-bundle-and-icon
Aug 2, 2026
Merged

syscod3 merged 1 commit into
mainfrom
feat/tray-app-bundle-and-icon

Conversation

@syscod3

@syscod3 syscod3 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Icon: generated a proper monochrome macOS "template" icon (black silhouette, real alpha) from the existing logo, wired via SetTemplateIcon so macOS auto-tints for light/dark menu bars. The old SetIcon with the full-colour app logo rendered as an illegible blob at real menu bar size.
  • Click behavior: left-click now opens the web UI directly (fyne.io/systray's SetOnTapped bypasses the dropdown menu on left-click). Right-click still shows the menu (status + Quit).
  • Real .app bundle: added packaging/macos/Info.plist.template + a release.yml step that assembles BpmTray.app (LSUIElement, real AppIcon.icns) and zips it per-arch as an additional release asset, so it can go through Spotlight/Launchpad//Applications instead of being a bare terminal binary.

Test plan

  • go build ./..., go vet ./..., go test ./... all pass
  • Verified the monochrome silhouette renders clearly at small scale
  • Built + ran bpm-tray locally with the new icon/click wiring, confirmed server still responds
  • Assembled a real BpmTray.app locally, zipped it, unzipped fresh, launched via open BpmTray.app (same path Finder/Spotlight take), confirmed the server responds and no Dock icon appears

Three real gaps found live testing bpm-tray:

1. The tray icon used the full-colour app logo via SetIcon - rendered as an illegible colour blob at actual menu bar size. Generated a proper macOS 'template' icon (assets/logo-template.png): flat black silhouette with real alpha, cropped and downsized from the same source logo via ImageMagick (fuzzy black->transparent, recolour remaining pixels solid black, trim, resize). Wired via SetTemplateIcon so macOS tints it correctly for light/dark menu bars.

2. Clicking the icon required navigating a dropdown menu just to open the web UI. fyne.io/systray's SetOnTapped fires directly on left-click instead of showing the menu (confirmed by reading systray_darwin.go: tappedLeft, if set, is called instead of show_menu()). Wired left-click to open the browser directly; right-click still shows the menu (status + Quit), since SetOnSecondaryTapped is left unset.

3. Running bpm-tray meant launching a bare Mach-O binary from a terminal - no Spotlight, no Launchpad, no /Applications entry. Added packaging/macos/Info.plist.template and a release.yml step that assembles a real BpmTray.app (LSUIElement so it never shows a Dock icon, proper AppIcon.icns built from the same logo via sips+iconutil) and zips it per-arch as an additional release asset, alongside the existing raw binary tarball. Verified locally end-to-end: built, zipped, unzipped fresh, launched via `open BpmTray.app` (the same path Finder/Spotlight take), confirmed the server responds and the process never appears as a foreground/Dock app.
@syscod3
syscod3 merged commit 2e9e871 into main Aug 2, 2026
3 checks passed
@syscod3
syscod3 deleted the feat/tray-app-bundle-and-icon branch August 2, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant