whiplash makes your whiptail apparent by mixing up some colors. This project contains color schemes to alter the default representation of applications based on Newt such as whiptail.
Newt is a programming library for color text, widget based user interfaces. It comes with whiptail, a replacement for dialog. whiptail is used, among other, as a frontend to Debian APT and its debconf tool.
Here follows some examples.
Lamenting is a darker theme with some green and magenta.
Scorched is a dark theme with red.
This is the default for illustrative purposes.
Copy the color scheme and setup your environment.
git clone https://github.com/op/whiplash ~/.config/whiplash
export NEWT_COLORS_FILE=~/.config/whiplash/lamenting
To setup with debconf (select dialog);
sudo visudo /etc/sudoers.d/newt
Defaults env_keep += "NEWT_COLORS_FILE"
sudo dpkg-reconfigure debconf
If you want to try it out;
cd ~/.config/whiplash
NEWT_COLORS_FILE=lamenting ./example/whiptail
NEWT_COLORS_FILE=scorched ./example/msgbox 'No Pasaran'
Had to write this down. My journey with debconf frontends.
For months, all dialogs displayed by debconf were almost unreadable on my system. Not sure if the root cause is my X setup, changing to Alacritty or upgrading to Debian buster.
-
readline. This is the classic, but has it changed? Doesn't look familiar. What's up with the underlined text and things? And, where did the default choices go?
-
Editor. Tried for a while. Felt annoying.
-
Dialog. Colors have changed. Super hard to read. Whatever. Was stuck with this for a while until today.
-
GNOME. Tried but the default window sizes are full screen. Looks horrible in xmonad unless they are kept in tiled mode. I also don't use a mouse you know, so this adventure was kept short.
-
Tried
apt-cache search debconf
if there's any frontend I've missed. Checkapt-cache show debconf
and findswhiptail
. This looks familiar! -
Replace whiptail with readline. Hello 1990. Flashbacks to the days of
make menuconfig
. -
Skim through
debconf(7)
. Bingo. If you addlibterm-readline-gnu-perl
, you get default values. Wasn't that easy? -
Decided to look into whiptail again. Bingo. Ends up in newt.c from stackoverflow. Look at that. Colors can be customised. It uses SLtt_set_color. Slang. Documentation is not very helpful.
??.
-
NEWT_MONO
is quite nice. However, I ended up with two themes.
PS. I do love debconf. (Just found out that it is being deprecated in favour of cdebconf. Haha!)