Skip to content

Let a theme give every group a base style, including the groups people create #809

Closed

Description

@M4n0x

Problem

A group's look comes only from its own style (groups[group]!.style in Sources/StableBar/LayoutConfiguration.swift), so a theme can style only the groups it names. Groups people make don't follow the theme:

  • Group With in Settings writes a literal faint grey, "background": "#8080802e", with the theme's corner radius at that moment and 4 pt side padding (WidgetGrouping.newGroupStyle in Sources/StableBar/WidgetGrouping.swift). Switching theme keeps that grey and those numbers. Under Fern, from the Store, such a group stays a grey box beside Fern's pills.
  • Choosing a token by hand doesn't fix it. The nearest one, surfaceRaised, is also the hover background in 20 of the 23 bundled themes (defaults.hoverBackground in Resources/themes), so a widget inside such a group shows no hover.
  • A theme drawn as pills repeats one pill style in every group it defines. Fern sets the same background, corner radius, padding and spacing in its seven groups, changing only the clock's background and the workspaces' padding.

Proposal

A groupDefaults style beside defaults, popupDefaults and workspaceDefaults, which every group starts from:

"groupDefaults": { "background": "@token.surfaceRaised", "cornerRadius": 14, "paddingHorizontal": 0, "spacing": 0 },
"groups": {
  "clock": { "style": { "background": "@token.accent" }, "members": [{ "type": "clock" }] },
  "status": { "members": [{ "type": "battery" }, { "type": "network" }] }
}
  • A group's style resolves as groupDefaults, then that group's style, property by property, for a theme's groups and the user's own alike. Layers merge as defaults does: the theme's groupDefaults, then includes, the main file and profiles.
  • Built-in sets no groupDefaults, so nothing changes under Built-in, and a group that sets a property keeps it. Under a theme that sets groupDefaults, a group without a style of its own takes the theme's look. That is the point, but it's the one change existing files can see.
  • Group With writes no style when the effective groupDefaults has a background, so the new group looks like the theme's own and follows a theme switch. Without one, it keeps writing today's faint grey.
  • Settings: an Every group scope beside Every widget edits groupDefaults, and a group's page shows the values it inherits, with a way back to them.
  • Themes can set it (validateThemeDocument), theme links accept it (DECISIONS.md), Save as Theme moves it into the theme, Theme lists it among the values Reset them removes, and the website's theme creator knows the key (site/creator/files.mjs). Widget packages can't set it, as with popupDefaults.
  • Decoding, stablebar.schema.json, and docs/themes.md, docs/layout.md and docs/styling.md.

This adds a configuration property, so it needs a maintainer's OK.

Possible today

Partly. A theme styles the groups it names, and a "when": { "theme": "<id>" } profile can restyle each of your own groups for one theme:

"profiles": [
  {
    "name": "Fern",
    "when": { "theme": "fern" },
    "configuration": {
      "groups": { "my-group": { "style": { "background": "@token.surfaceRaised", "cornerRadius": 14, "paddingHorizontal": 0 } } }
    }
  }
]

That's a profile per theme and an entry per group, written by each person.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Nov 18, 2026
  2. stablebar-releases commented on Nov 20, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.18.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions