Skip to content

Terminal theme can only be changed from the CLI, not from Settings #235

Description

@arzafran

What's wrong

The terminal theme can only be changed by running programa themes set in a
terminal. There is nothing for it in Settings, so most people will never find
it. Settings > Appearance has workspace colours and sidebar options, but no way
to pick the theme the terminal itself uses.

Steps to see it

  1. Open Settings.
  2. Go to the Appearance tab.
  3. Look for a terminal theme option. There isn't one.
  4. Run programa themes set catppuccin-mocha in any terminal.
  5. The theme changes, so the capability exists, just not in the UI.

This is smaller than it looks

The machinery already works end to end and the CLI proves it:

  • CLI/CLI+Themes.swift lists, sets and clears themes, including separate light
    and dark selections, and ships an interactive picker.
  • It writes a managed override at
    ~/Library/Application Support/<bundle-id>/config.ghostty.
  • It posts com.darkroom.programa.themes.reload-config, which
    Sources/AppDelegate.swift already handles by calling
    GhosttyApp.shared.reloadConfiguration, so themes apply without a relaunch.
  • Theme discovery already exists on the app side too, in
    GhosttyConfig.themeSearchPaths and themeNameCandidates
    (Sources/GhosttyConfig.swift).

So this is a Settings surface over code that already runs, not new config
plumbing. The one real piece of work is that the set/clear logic currently lives
in the CLI target and needs sharing with the app rather than being copied.

Tasks

  • Add a terminal theme picker to Settings > Appearance, with separate light
    and dark selections so it matches what the CLI can already express.
  • Reuse GhosttyConfig.themeSearchPaths for the list instead of duplicating
    the CLI's enumeration.
  • Write the same managed override file the CLI writes and trigger the
    existing reload. Verify: pick a theme in Settings, the terminal background
    changes with no relaunch, and programa themes list reports the same
    selection.
  • Localize the new strings in Resources/Localizable.xcstrings (English and
    Japanese).
  • Support the setting in ~/.config/programa/settings.json and document it,
    per the settings policy in CLAUDE.md.

Worth checking while in here

The sidebar's "Match Terminal Background" derives its contrast from the terminal
background and listens for ghosttyDefaultBackgroundDidChange, so it should
follow a theme change made from Settings with no extra work. Confirm that it
does, with a light theme and a dark theme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions