Skip to content

[Feature] Theming system — overridable color palette instead of hardcoded constants #53

Description

@fissible

Source: external review report, 2026-08-24 (notable exclusion #2)

Gap

Colors are hardcoded constants (SHELLFRAME_GRAY, etc.) except toast's ad-hoc theme override. Any embedder wanting brand colors must sed the source.

What it needs

  • A palette of semantic roles, not raw colors: SHELLFRAME_THEME_BORDER, _TITLE, _ACCENT, _MUTED, _ERROR, _SUCCESS, _SELECTED_BG, _SELECTED_FG
  • Defaults set with : "${SHELLFRAME_THEME_BORDER:=$'\033[90m'}" so consumers override by exporting before source shellframe.sh
  • Widgets read roles, never raw constants; keep the old SHELLFRAME_GRAY names as aliases for one release
  • Fold toast's override into the same mechanism
  • Optional: shellframe_theme_load path/to/theme.sh and one or two shipped themes (default, mono/no-color)
  • NO_COLOR env var honored (https://no-color.org)

Tests

  • Unit: export a role, source, render confirm → escape present in output
  • Unit: NO_COLOR=1 → no SGR sequences emitted

Effort: M
Deps: #42 (H2) (so %b is only ever applied to theme constants — theming makes that boundary explicit)

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions