nmtui: some hard-coded Newt-related colors cannot be changed via environment variable
Newt allows to completely change the colors of widgets using environment variables: either by specifying colors directly in NEWT_COLORS
or by referring to a file in NEWT_COLORS_FILE
. For example:
#!/bin/sh
NEWT_COLORS='
window=white,red
border=white,red
checkbox=white,red
actcheckbox=white,green
' nmtui
Unfortunately, nmtui
cannot be completely customized due to a few hard-coded colors in the source code of nmt_newt_init()
(lines 116 to 120):
newtSetColor(NEWT_COLORSET_CHECKBOX, "black", "lightgray");
newtSetColor(NMT_NEWT_COLORSET_BAD_LABEL, "red", "lightgray");
newtSetColor(NMT_NEWT_COLORSET_PLAIN_LABEL, "black", "lightgray");
newtSetColor(NMT_NEWT_COLORSET_DISABLED_BUTTON, "blue", "lightgray");
newtSetColor(NMT_NEWT_COLORSET_TEXTBOX_WITH_BACKGROUND, "black", "white");
(It can be seen when running the above extreme example that checkbox colors do not change indeed.)
Please remove forcing the NEWT_COLORSET_CHECKBOX
color and make it possible to customize the extra NMT_NEWT_COLORSET_<WIDGET>
colors via some environment variable.
Thanks for the great piece of software!