Skip to content

Allow independently distributed native SwiftUI widgets #641

Closed as not planned

Description

@1tuz

Problem

Widget authors cannot distribute their own SwiftUI views for StableBar without changing and rebuilding the app. Existing packages configure widgets through JSON and commands, but cannot provide native views, animations, or custom SwiftUI controls.

Proposal

Explore a versioned native widget plugin interface integrated with the existing package and popup systems. A developer should be able to build a separate plugin and a user should be able to review, install, enable, disable, and remove it without rebuilding StableBar. Include a small example and developer documentation.

Native plugins execute in StableBar's process with its permissions. They must not load before the user explicitly trusts the specific signed code. Changes to a plugin need renewed review. The API must define compatibility, lifecycle, and failure handling.

Open security and distribution questions need maintainer input: the current Developer ID build uses Hardened Runtime and Library Validation, which prevents loading a bundle signed by a different team. Allowing arbitrary third-party code in-process requires a security exception. Signature checks and consent do not sandbox that code. Plugin crashes can terminate the app, and disabling a plugin may require a restart to unload its code. An ABI boundary and signing policy must be chosen before a stable API is promised.

Possible today

Packages can supply JSON layouts, popups, and commands, but runtime SwiftUI plugins are not supported (see docs/popups.md). Authors can add a built-in widget to StableBar's source and rebuild it.

Related

Triaged by Codex (GPT-6).

Activity

  1. added
    needs-triage
    on Nov 14, 2026
  2. added
    enhancement
    P3
    and removed
    needs-triage
    on Nov 14, 2026
  3. Seb-GRAF commented on Nov 16, 2026

    @Seb-GRAF
    Collaborator

    Thanks again for the PR and the context, we'll extend the widget system instead of adding native plugins

    You can already have DuoBar itself on the bar: run it next to StableBar, put its item on the bar in Menu bar items and choose "As in the menu bar" under Show (or { "app": "DuoBar", "display": "live" } in shown). It needs macOS 27, Screen Recording access and a beta for now, and it's a copy refreshed every two seconds, so the animations won't play.

    To build something similar as a regular package, without Swift, we'll add:

    1. Draw a value as a ring, with a symbol in its center #689 a ring block
    2. Report whether the Mac is on Wi-Fi, Ethernet or offline from the network provider #690 Wi-Fi, Ethernet or offline from the network provider
    3. Report which of CPU, memory or heat is under strain from the system provider #691 which of CPU, memory or heat is under strain, for an adaptive ring
    4. Combine several providers so one widget can show battery, network and volume together #692 a provider that combines others, so one widget can show battery, network and volume together

    Once those are in you'll be able to build a DuoBar-like widget that follows the theme. It won't match everything (no Wi-Fi name, no custom animations), but it should get you close

  4. Seb-GRAF commented on Nov 16, 2026

    @Seb-GRAF
    Collaborator

    Hey @1tuz , I've pushed a few fixes that allow open rings with dots, combining multiple system providers in one widget, checking for the Wi-Fi name, native volume and output controls, and also adding detail views in popups.. I also made a widget that acts a bit similar, it's in the store and called Status ring. I'm doing a stable release soon but if you choose the beta channel for the app you can try it.

    popup-main-dark

    Two things I said wouldn't work actually do now: the Wi-Fi name shows up (macOS asks for Location the first time) and the volume flashes next to the ring when you change it. The battery view also lists your Bluetooth devices

    Feel free to fork or open a PR if you want to add more features

    Let me know what you think!

  5. 1tuz commented on Nov 16, 2026

    @1tuz
    Author

    Hey, @Seb-GRAF ! Very nice! Thanks! Need to add this feature to the stable release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions