8000 Feature: custom default color schemes for terminal/PowerShell instances · Issue #4 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Feature: custom default color schemes for terminal/PowerShell instances #4

Closed

Description

@Xilous

Summary

Allow users to configure custom default color schemes that are automatically applied to new terminal/PowerShell instances spawned inside wmux.

Today, newly spawned shells fall back to whatever the host terminal profile provides, which makes it hard to:

  • Maintain a consistent look across panes and sessions
  • Match wmux visuals (e.g. the browser panel theme) with the shell color palette
  • Differentiate roles of panes (e.g. a red-tinted prod shell vs. a green dev shell) at a glance

Proposed behavior

  • Provide a configurable theme/palette applied as the default for any new terminal or PowerShell instance created by wmux.
  • Support at minimum:
    • Foreground / background colors
    • ANSI 16-color palette (normal + bright)
    • Optional cursor color
  • Allow configuration via a config file (e.g. ~/.wmux/config.toml or equivalent) and/or a CLI flag when spawning a pane.
  • Ship a small set of built-in presets (e.g. dark, light, solarized, dracula) that users can select by name.
  • Allow per-pane overrides so a specific shell can opt into a different scheme without changing the global default.

Example (illustrative)

[terminal.colors]
default = "dracula"

[terminal.colors.schemes.prod]
background = "#2b0b0b"
foreground = "#ffdddd"
cursor     = "#ff5555"
wmux pane new --shell pwsh --color-scheme prod

Motivation / use cases

  • Visual consistency between wmux UI and shells
  • Quickly distinguishing environments (dev / staging / prod) by color
  • Accessibility: users who need higher contrast or specific palettes shouldn't have to reconfigure every spawned shell manually

Alternatives considered

  • Configuring color schemes at the OS terminal level (Windows Terminal profile, etc.) — works, but doesn't let wmux differentiate panes or apply per-session overrides.
  • Running Set-PSReadLineOption / ANSI escape scripts in each new shell — brittle, requires shell-specific setup.

Happy to help refine the config shape or contribute a PR if the direction is welcome.

Activity

  1. amirlehmam commented on Apr 18, 2026

    @amirlehmam
    Owner

    Hi @Xilous — shipped in v0.7.1. Thanks for the well-scoped request, the example config was basically the API I ended up building.

    What's in the release

    12 bundled presets (Ghostty .theme format under resources/themes/):
    Dracula, Solarized Dark/Light, Nord, Gruvbox Dark, One Dark, Tokyo Night, Catppuccin Mocha, GitHub Light, Monokai — plus Prod Red, Staging Amber, Dev Green as ready-made environment tints for the exact dev/staging/prod use case you described.

    Full ANSI 16-color palette + FG/BG + cursor + selection colors, matching your minimum bar.

    Global default — Settings > Terminal > Default scheme (dropdown auto-populated from bundled themes + any user-defined schemes).

    Per-pane overrides via CLI:

    wmux split --down --color-scheme "Prod Red"
    wmux pane new --color-scheme "Dev Green"
    wmux new-surface --shell pwsh --color-scheme "Staging Amber"
    wmux set-color-scheme "Prod Red"        # retag the current pane mid-session
    wmux clear-color-scheme                  # revert to global default
    wmux list-themes                         # discover valid names

    User-defined schemes — Settings > Terminal > Custom schemes. Partial overrides (you only specify background / foreground / cursor) layered on top of a bundled base theme. Addressable by name in --color-scheme, persisted with your settings.

    Live reload — changing the default or editing a user scheme repaints every open terminal immediately. No restart, no PTY recreation.

    How the config shape landed

    I went with the same semantics as your TOML example, just expressed through the existing settings store + bundled theme files:

    • terminalPrefs.theme → your default = "dracula"
    • terminalPrefs.userColorSchemes → your [terminal.colors.schemes.prod] block (keyed by name, partial overrides)
    • --color-scheme <name> → your --color-scheme prod

    Resolution priority: per-surface override → global default → Monokai fallback.

    No standalone ~/.wmux/config.toml file yet — wmux persists settings through the existing store, so adding a TOML reader would just be a different path to the same state. Happy to add it if you'd prefer config-as-code over the settings UI; open a follow-up and we'll land it.

    Install

    Grab wmux-0.7.1-win-x64.zip from the release, extract, run wmux.exe. If Windows SmartScreen flags the zip after download: right-click the archive > Properties > Unblock before extracting.

    Try wmux list-themes once it's running to see the available names, then wmux split --color-scheme "Prod Red" for the classic red-tinted prod pane. Feedback welcome.

  2. amirlehmam commented on Apr 18, 2026

    @amirlehmam
    Owner

    Follow-up — shipped the two things I left as "possible next steps" in the previous comment. 🎯

    v0.7.2 (release, docs):

    1. ~/.wmux/config.toml reader

    Your exact example from the issue now works verbatim:

    [terminal.colors]
    default = "Dracula"
    
    [terminal.colors.schemes.prod]
    background = "#2b0b0b"
    foreground = "#ffdddd"
    cursor     = "#ff5555"

    Plus a fuller surface for the rest of TerminalPrefs:

    [terminal]
    font-family      = "Cascadia Mono"
    font-size        = 14
    cursor-style     = "block"          # block | underline | bar
    cursor-blink     = true
    scrollback-lines = 10000
    
    [terminal.colors.schemes.dev]
    background = "#0b1f0b"
    foreground = "#ccffcc"
    palette    = ["#000", "#ff5555", "#55ff55", ...]   # up to 16 ANSI

    New CLI:

    wmux config path      # print config file location
    wmux config show      # dump parsed config (useful to debug TOML syntax)
    wmux config reload    # re-read and live-apply to every open surface
    wmux reload-config    # shorthand

    Precedence: built-in defaults → Settings UI → config.toml → per-pane overrides (--color-scheme). File wins at startup, app wins at runtime — edit in the UI without your dotfile clobbering your live tweaks, then wmux reload-config whenever you want the file to take over again.

    The parser is hand-rolled (zero deps, to dodge the native-module traps this repo has), covered by 13 unit tests. wmux config show reports per-key parse errors without aborting the whole file, so a typo in one scheme doesn't nuke the rest of your config.

    2. More bundled presets

    Went from 12 → 29. Added: Ayu Dark / Mirage / Light, Cobalt 2, Material Dark, Monokai Pro, Palenight, Oceanic Next, Everforest Dark, Rose Pine, Kanagawa, Horizon, SynthWave 84, Zenburn, GitHub Dark, Night Owl, Nightfly.

    All work as default = "..." in TOML, as --color-scheme "..." on the CLI, and in the Settings UI dropdown. wmux list-themes prints the current list.


    Install: grab wmux-0.7.2-win-x64.zip from the release page, right-click → Properties → Unblock, extract, run.

    If you want a specific extra theme or a config key I didn't ship, reopen or drop a comment — easy to add. 🚀

  3. added a commit that references this issue on Jun 15, 2026
  4. added a commit that references this issue on Aug 20, 2026
    d2765a5
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0