Skip to content
/ whiplash Public

whiplash makes your whiptail apparent by mixing up some colors

Notifications You must be signed in to change notification settings

op/whiplash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whiplash

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.

Overview

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.

Examples

Here follows some examples.

Lamenting

Lamenting is a darker theme with some green and magenta.

lamenting gauge lamenting checklist

Scorched

Scorched is a dark theme with red.

scorched gauge scorched checklist

default

This is the default for illustrative purposes.

default gauge default checklist

Usage

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'

Background

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.

  1. 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?

  2. Editor. Tried for a while. Felt annoying.

  3. Dialog. Colors have changed. Super hard to read. Whatever. Was stuck with this for a while until today.

  4. 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.

  5. Tried apt-cache search debconf if there's any frontend I've missed. Check apt-cache show debconf and finds whiptail. This looks familiar!

  6. Replace whiptail with readline. Hello 1990. Flashbacks to the days of make menuconfig.

  7. Skim through debconf(7). Bingo. If you add libterm-readline-gnu-perl, you get default values. Wasn't that easy?

  8. 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.

    ??.

  9. 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!)

About

whiplash makes your whiptail apparent by mixing up some colors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages