Themes
Theme System
Themes are pure variable exports. Each theme file sets the same 15 @theme-* user options. Modules reference these variables (#{@theme-accent}) instead of hardcoding hex values. Switching themes requires changing one line in tmux.conf.
Available Themes
| Theme | Palette | Character |
|---|---|---|
|
Purple gradient ( |
Deep, elegant — the default |
|
Warm orange ( |
High energy, high contrast |
|
Cool blue ( |
Clean, calm, nocturnal |
Variable Contract
Every theme MUST export all 15 variables. Modules depend on this contract — a missing variable breaks rendering.
| Variable | Purpose | Example (aethelred) |
|---|---|---|
|
Base background |
|
|
Base foreground |
|
|
Primary accent |
|
|
Bright accent variant |
|
|
Dark accent variant |
|
|
Success, clean state |
|
|
Warning, attention |
|
|
Error, danger, OFF state |
|
|
Info, secondary highlight |
|
|
Tertiary accent |
|
|
Subdued text |
|
|
Elevated surface |
|
|
Brighter surface |
|
|
Copy mode highlight bg |
|
|
Copy mode highlight fg |
|
How Themes Propagate
Theme is sourced BEFORE modules that reference variables:
core → vim → mouse → [THEME] → clipboard → panes → sessions → ...
References in modules:
-
lib/status.conf— status bar colors, window format -
lib/panes.conf— pane border format with@theme-accent,@theme-muted -
lib/sessions.conf— nested tmux OFF state uses@theme-surface,@theme-red -
lib/modern.conf— popup border color -
plugins/tpm.conf— prefix-highlight colors
Switching Themes
Manual (edit tmux.conf)
Change line 15 of tmux.conf:
source-file ~/.config/tmux/themes/tokyo-night.conf
Then reload: C-a r
Interactive (theme-switcher.sh)
~/.config/tmux/scripts/theme-switcher.sh --fzf # interactive with preview
~/.config/tmux/scripts/theme-switcher.sh --next # cycle to next
~/.config/tmux/scripts/theme-switcher.sh tokyo-night # switch by name
The script modifies tmux.conf (with backup), then reloads automatically if inside tmux.
Adding a New Theme
-
Copy an existing theme as template:
cp themes/aethelred.conf themes/my-theme.conf -
Change all 15 color values
-
Keep the variable names identical — the contract must hold
-
Test: source manually, verify status bar, pane borders, copy mode highlight, nested OFF state