Skip to content

Remove forcing the NEWT_COLORSET_CHECKBOX color in nmtui

nmtui will set hardcoded color to NEWT_COLORSET_CHECKBOX, overriding color set by NEWT. I changed it so custom color can now be set to NEWT_COLORSET_CHECKBOX with NEWT_COLORS enviroment variable. You can try this by typing $export NEWT_COLORS='checkbox=green,green' in the terminal and then running NetworkManager/src/nmtui/nmtui.

Custom colors can now also be set to these NMT widgets: NMT_NEWT_COLORSET_BAD_LABEL, NMT_NEWT_COLORSET_PLAIN_LABEL, NMT_NEWT_COLORSET_DISABLED_BUTTON, NMT_NEWT_COLORSET_TEXTBOX_WITH_BACKGROUND which also only had hardcoded colors before. These can be set with NMT_NEWT_COLORS enviroment variable. Try this by typing: $export NMT_NEWT_COLORS='plainLabel=green,green' in the terminal and then running NetworkManager/src/nmtui/nmtui.

I copied and edited code for the patch from the NEWT library, more speciffically from here: https://pagure.io/newt/blob/e418dd9b6e38935210f8e8b9ce3f5c837fbf579c/f/newt.c (line 234 - 326) Commited1 by Miroslav Lichvar. The code is originally GPL licensed and I took it under terms of LGPL.

Edited by Vojtech Bubela

Merge request reports