MenuBarExtraProviding
Adopt to contribute a menu bar extra.
@MainActor protocol MenuBarExtraProviding : Droplet
The host owns the resulting status item, so it is torn down when the droplet is disabled, removed, or fails to deactivate. Building your own NSStatusItem also works (a droplet runs in-process), but nothing then removes it if your teardown does not run, and the user is left with an icon that has no owner.
- Note: Maturity: Supported. The host consumer has been available since 0.3.2. Requires the
menu-barcapability.
Methods
makeMenuBarExtra()
@MainActor func makeMenuBarExtra() -> MenuBarExtraDescriptor?
The extra to show, or nil when the droplet currently contributes none. Re-read after every state-change broadcast.