nmtui is a newt app, and newt lets you override its palette per-invocation β no system config needed. Two env vars are read at startup (initColors in newt.c): NEWT_COLORS (inline string) or NEWT_COLORS_FILE (path to a palette file). Scope one to an alias so only nmtui is affected and whiptail & co. stay untouched:
source ~/.bashrc and done β that's Catppuccin Mocha (bonus claimed π). colorN names are xterm-256 indexes, which is exactly what tmux-256color speaks: text #cdd6f4β189, base #1e1e2eβ235, surface0 #313244β237, blue #89b4faβ111, green #a6e3a1β151, subtext1 #bac2deβ146, overlay0 #6c7086β243.
Three traps worth knowing:
Don'texport NEWT_COLORS in ~/.profile β it restyles every other newt TUI (whiptail, installer dialogs), not just nmtui. The alias scoping is what makes it "only nmtui".
The key names are newt's own (from parseColors in newt.c): actbutton, actlistbox, sellistbox, disentry. Ubuntu's /etc/newt/palette line disabledentry=β¦ is silently ignored β newt only knows disentry.
In tmux, make sure the session isn't degrading to 8 colors: set -g default-terminal "tmux-256color".
newt can't go beyond 256 (S-Lang layer), so colorN is as close to the mocha hexes as it gets β visually indistinguishable on most terminals.
nmtui is a newt app, and newt lets you override its palette per-invocation β no system config needed. Two env vars are read at startup (
initColorsin newt.c):NEWT_COLORS(inline string) orNEWT_COLORS_FILE(path to a palette file). Scope one to an alias so only nmtui is affected and whiptail & co. stay untouched:mkdir -p ~/.config/nmtui cat > ~/.config/nmtui/palette <<'EOF' root=color189,color235 window=color189,color235 border=color111,color237 title=color111,color235 button=color111,color239 actbutton=color235,color111 checkbox=color111,color237 actcheckbox=color235,color151 entry=color189,color237 label=color146,color235 listbox=color189,color235 actlistbox=color235,color111 textbox=color189,color235 acttextbox=color189,color239 helpline=color243,color235 roottext=color243,color235 sellistbox=color189,color237 actsellistbox=color235,color111 emptyscale=color239,color235 fullscale=color111,color235 disentry=color243,color237 compactbutton=color111,color239 EOF alias nmtui='NEWT_COLORS_FILE="$HOME/.config/nmtui/palette" nmtui'source ~/.bashrcand done β that's Catppuccin Mocha (bonus claimed π).colorNnames are xterm-256 indexes, which is exactly whattmux-256colorspeaks: text #cdd6f4β189, base #1e1e2eβ235, surface0 #313244β237, blue #89b4faβ111, green #a6e3a1β151, subtext1 #bac2deβ146, overlay0 #6c7086β243.Three traps worth knowing:
export NEWT_COLORSin~/.profileβ it restyles every other newt TUI (whiptail, installer dialogs), not just nmtui. The alias scoping is what makes it "only nmtui".parseColorsin newt.c):actbutton,actlistbox,sellistbox,disentry. Ubuntu's/etc/newt/palettelinedisabledentry=β¦is silently ignored β newt only knowsdisentry.set -g default-terminal "tmux-256color".newt can't go beyond 256 (S-Lang layer), so
colorNis as close to the mocha hexes as it gets β visually indistinguishable on most terminals.