Repository navigation
Description
Problem
A theme can style groups but can't put widgets in them. A group has only a style, and each widget joins one with its own group, which must name a defined group or the whole configuration fails to load ("Unknown group" in Sources/StableBar/Configuration.swift). So a theme drawn as pills looks like a plain strip until people edit their configuration widget by widget.
Fern, from the Store, says so in its README: "A theme can't place widgets, so the pills come from groups in your configuration." It asks for a group on each widget, plus an empty entry in groups for each one, so the configuration still loads under other themes. Those assignments stay when you switch theme, and the theme's preview and Use in the gallery don't make them.
The theme profile condition from #666 (#696, #697, in the 0.16 betas) lets people keep these assignments in a "when": { "theme": "fern" } profile, but they still write them by hand, by widget ID.
Proposal
A group can say which widgets it holds, matched by built-in widget type and role, so a theme ships its pills already filled:
"groups": {
"workspaces": { "style": { "background": "@token.surfaceRaised" }, "members": [{ "type": "workspaces" }] },
"clock": { "style": { "background": "@token.accent" }, "members": [{ "type": "clock" }] },
"status": { "style": { "background": "@token.surfaceRaised" }, "members": [{ "type": "battery" }, { "type": "network" }] }
}- The membership comes with the theme: switch to another theme and the widgets leave its groups. Nobody needs empty
groupsentries. - A widget's own
group, whether set in the main file, an include or a profile, always wins, and there's a way to keep one widget out of a theme's group. - Theme membership never stops a configuration from loading. Members must share a
positiontoday ("Widgets in group … must share a position"), so a matching widget in another position stays out. - As with any group, members gather where the first one appears, so choosing the theme can move a widget next to the group's other members within its position. Positions and the order of groups stay the user's.
- Selectors stay narrow: built-in
typeandrole, matching every key listed. Script, provider and package widgets have no type that says what they show, so they still join withgroup. - Settings shows a widget the theme placed as part of its group.
members is a new key under groups, so the change is additive, and older builds skip it with a warning (Files from a newer StableBar). As a configuration change it needs a maintainer's OK. Which keys a selector may match and how a widget opts out are still open.
Possible today
Partly. Put a group on each widget and an empty entry in groups for each group, or, in the 0.16 betas, use a "when": { "theme": "<id>" } profile whose widgetOverrides set group on each widget by ID. Both have to be written by each person, widget by widget.
Related
- Add a shared presentation system for themes and bar layout #55 added roles and deferred "broad type/ID selectors" and "theme-defined layout variants". This is a narrow selector for group membership only. It adds no layout variants, and widgets keep their positions.
- Keep settings tuned for one theme from applying under every other theme #666 (open): parts 3 and 4 save settings tuned for one theme into a profile for that theme from Settings. With this, pill membership would no longer need saving that way.
- Create, join and style widget groups in Settings and while editing the bar in place #648 (open): Group with and Ungroup in Settings write a widget's
group. They would need to show a group the theme set and override it. - feat: add the Fern theme stablebar-packages#41 added Fern, which needs this. Its README's Pills section would shrink to a list of the groups.
Triaged by Claude Code (Claude Opus 5.5).
Activity
stablebar-releases commentedon Nov 20, 2026
🎉 This issue has been resolved in version 0.18.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀