Skip to content

Add bpm-tray: macOS menu bar app - #7

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

syscod3 merged 1 commit into
mainfrom
feat/menubar-tray-app

Conversation

@syscod3

@syscod3 syscod3 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New cmd/bpm-tray binary: a menu bar icon instead of a terminal command, using fyne.io/systray.
  • Auto-discovers real Bambu Studio filament/process/machine directories under ~/Library/Application Support/BambuStudio — no flags needed.
  • DB/backups live under ~/Library/Application Support/bpm.
  • Menu: Open bpm (launches browser), status line, Quit.
  • Exported webui.LogoPNG so the tray reuses the same embedded icon (go:embed can't reach outside its own package).
  • Needs cgo (Cocoa via systray) — added a macos-latest job to release.yml that builds it separately and attaches to the release goreleaser already created.
  • New make tray target; README documents it as a fourth install option.

Test plan

  • go build ./..., go vet ./..., go test ./... all pass
  • docker compose build still succeeds (bpm's build is unaffected by the new cgo-only dependency)
  • Built and ran locally: server auto-discovered real Bambu Studio dirs, /copy and /copy/process both wired correctly
  • Cross-compiled CGO_ENABLED=1 GOARCH=arm64 from an amd64 host successfully

New cmd/bpm-tray binary: a menu bar icon (fyne.io/systray) instead of a terminal command. Auto-discovers your real Bambu Studio filament/process/machine directories under ~/Library/Application Support/BambuStudio (picks the first non-default account-ID folder that has the relevant subdirectory) - no flags needed. DB and backups live under ~/Library/Application Support/bpm, since a menu bar app has no fixed working directory to default a relative bpm.db against. Menu: Open bpm (launches the browser), status line, Quit.

Exported webui.LogoPNG (was unexported logoPNG) so the tray icon reuses the same embedded asset instead of duplicating it - go:embed can't reach outside its own package's directory tree.

Needs cgo (Cocoa bridging via fyne.io/systray), so it can't build on the existing CGO_ENABLED=0 cross-compiling release job - added a second release.yml job on macos-latest that builds it for both architectures and attaches the tarballs to the same release goreleaser already created. Verified locally: built for the current arch and cross-compiled CGO_ENABLED=1 GOARCH=arm64 from an amd64 host, ran it, confirmed both /copy and /copy/process wire up correctly against real Bambu Studio directories, and the embedded HTTP server responds on :8080 within a couple seconds of the process starting.

New Makefile target: make tray. README documents it as a fourth install option.
@syscod3
syscod3 merged commit 8539e22 into main Aug 2, 2026
3 checks passed
@syscod3
syscod3 deleted the feat/menubar-tray-app branch August 2, 2026 14:16
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