Themes & Colors
Nash takes its colors from a theme. A theme sets the terminal background and text, the ANSI palette, the cursor, the accent color, and the tab colors. This page shows how to choose a theme, how to override single colors, and how to write your own theme.
Where the files live
| File | Location | What it holds |
|---|---|---|
nash.toml | ~/.config/nash/nash.toml | Your settings, including which theme is active. |
themes.toml | ~/.config/nash/themes.toml | The themes. Each top-level table is one theme. |
Set the NASH_CONFIG_DIR environment variable to use a different directory.
Nash watches both files. When you save one, Nash reloads the configuration and
the colors change at once.
When you update Nash, the first launch of the new build adds the themes that
your themes.toml lacks. It does not change a theme that you edited. A shipped
theme that you delete comes back at the next sync. See
Configuration Sync for how to
keep one out.
Choose a theme
Run Themes from the command palette (SUPER+SHIFT+P) or the View menu. The
picker lists the themes by name, with the current one first and marked
(Current). When you choose a theme, Nash writes its id to nash.toml and
reloads the configuration.
You can also set the theme by hand. The id is the name of the table in
themes.toml:
[ui] theme = "matrix"
The file that Nash ships selects qodo. The shipped theme ids are nash,
nash_gray, qodo, tokyo-night, dracula, nord, nordor, mocha,
latte, gruvbox_dark, gruvbox_light, solarized_dark, solarized_light,
rose_pine_dawn, one_dark_pro, monokai, night_owl, light_owl,
winter_is_coming, atom_one_light, bluloco_dark, snazzy, and matrix. A
theme without a name shows its id in the picker.
Matrix Green
Matrix Green (id matrix) is an old-school phosphor CRT theme. Every color
is a shade of green on a near-black screen: the background is #0b140d, the
accent is #00ff41, and the body text is a calmer #5ceb87, so the cursor and
the active tab still stand out. The red slot is the dimmest and warmest color
and the green slot is the most vivid, so a diff still reads correctly.
Matrix Green needs Nash 0.5.7 or newer.
Terminal text color
A theme can set the color of plain terminal text with the foreground key. This
needs Nash 0.5.7 or newer. In the themes that Nash ships, only Matrix Green sets
it. A theme without foreground keeps the built-in text color, so its ANSI
palette stays as it is.
You can set the text color yourself with foreground in the [ui] table of
nash.toml. This value overrides the theme:
[ui] theme = "nord" foreground = "#d8dee9"
Override single colors
These keys in the [ui] table of nash.toml take priority over the same value
in the theme:
| Key | What it sets |
|---|---|
background | Terminal background color. |
foreground | Terminal text color. |
color_accent (or accent) | Accent color for highlights, selection, and folded pane strips. |
cursor_color | Cursor color. |
cursor_bg, cursor_border, cursor_fg | The cursor fill, its border, and the character under it. |
background_opacity | Window opacity. The shipped value is 0.99. A value from 0.9 to 1 is recommended. |
title_bar_opacity | Title bar opacity. The shipped value is 1. |
Write your own theme
Add a table to ~/.config/nash/themes.toml. The table name is the theme id. Any
top-level table that holds at least one setting appears in the picker. A value
can refer to another value with ${table.key}.
[my-theme] name = "My Theme" desc = "A short description for the picker" main = "#101418" accent = "#ff9f1c" background = "${my-theme.main}" color_accent = "${my-theme.accent}" foreground = "#d8dee9" cursor_color = "${my-theme.accent}" tab_bg = "#1b222b" tab_bg_inactive = "${my-theme.main}" tab_fg = "#ffffff" tab_fg_inactive = "#5b6773" ansi = [ "#1b222b", # black "#e06c75", # red "#98c379", # green "#e5c07b", # yellow "#61afef", # blue "#c678dd", # magenta "#56b6c2", # cyan "#d8dee9", # white ] brights = [ "#4b5563", # bright black "#ef8891", # bright red "#aedb8f", # bright green "#f0d08f", # bright yellow "#7cc0f7", # bright blue "#d68ff0", # bright magenta "#6fcdd8", # bright cyan "#ffffff", # bright white ]
Nash reads these keys from a theme: background, foreground, color_accent,
cursor_color, cursor_bg, cursor_border, cursor_fg, tab_bg,
tab_bg_inactive, tab_fg, tab_fg_inactive, ansi, and brights. The
name and desc keys only label the theme in the picker. Names such as main
and accent are helpers that you can refer to with ${...}.
The ansi and brights lists hold 8 colors each, in the order black, red,
green, yellow, blue, magenta, cyan, white.
Font and line height
The [font] table of nash.toml sets the terminal font. The values are the
ones in the shipped file.
| Key | Shipped value | What it does |
|---|---|---|
font | "Hack Nerd Font | JetBrainsMono Nerd Font" | Font family. Separate fallback families with |. |
font_size | 12 | Size in points. |
line_height | 1.1 | Line height multiplier. A value from 0.9 to 1.2 is recommended. |
italic | false | Turns the italic face on or off. |
bold | false | Turns the bold face on or off. |
line_height needs Nash 0.4.0 or newer. Tab titles have their own size. See
Tabs.
Inactive panes and dividers
These keys in the [pane] table of nash.toml control how Nash shows the panes
that do not have focus. They are multipliers.
| Key | Shipped value | What it does |
|---|---|---|
inactive_brightness | 1 | 1 keeps the brightness of the active pane. A lower value dims the pane. |
inactive_saturation | 0.9 | 1 keeps the colors. 0 gives gray scale. |
pane_divider | "light" | Divider color: match, light, dark, accent, or none. |
If you raise inactive_brightness above 1, raise inactive_saturation with
it. Otherwise the text looks washed out.
Zen Mode replaces these two values with its own stronger values while it is on. See Closing Panes & Zen Mode.
Tab colors
A theme sets the colors of the active and inactive tab with tab_bg,
tab_bg_inactive, tab_fg, and tab_fg_inactive. You can also give one tab
its own color. See Tabs.