Earthy colour scheme across my common apps
#318 Henry, Wednesday, 25 November 2015 2:42 PM (Category: Linux)
(Tags: commandline colorscheme)

I recently switched the colorscheme for Vim over to Gruvbox with a dim brown background and brown/green theme. It's been very restful and I can see all the typing now and not strain my eyes.

It's been so good, that I tried to do the same with the three command line things I use the most after Vim - the shell, mutt, and Midnight Commander. I spend most of my life on the command line and I use text tools for almost everything. Firefox is the only GUI based app I use a lot.

So I had to do a lot of reading to shape the colours for those three things.

To change the shell colours, I edited my $HOME/.Xdefaults file and added this section at the end:

xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-color

!BLK Cursor
#define _color0        #000d18
#define _color8        #000d18
!RED Tag
#define _color1        #e89393
#define _color9        #e89393
!GRN SpecialKey
#define _color2        #9ece9e
#define _color10       #9ece9e
!YEL Keyword
#define _color3        #f0dfaf
#define _color11       #f0dfaf
!BLU Number
#define _color4        #8cd0d3
#define _color12       #8cd0d3
!MAG Precondit
#define _color5        #c0bed1
#define _color13       #c0bed1
!CYN Float
#define _color6        #dfaf8f
#define _color14       #dfaf8f
!WHT Search
#define _color7        #efefef
#define _color15       #efefef
!FMT Include, StatusLine, ErrorMsg
#define _colorBD       #ffcfaf
#define _colorUL       #ccdc90
#define _colorIT       #80d4aa
!TXT Normal, Normal, Cursor
#define _foreground    #dcdccc
#define _background    #1f1f1f
#define _cursorColor   #8faf9f
XTerm*color0         : _color0
XTerm*color1         : _color1
XTerm*color2         : _color2
XTerm*color3         : _color3
XTerm*color4         : _color4
XTerm*color5         : _color5
XTerm*color6         : _color6
XTerm*color7         : _color7
XTerm*color8         : _color8
XTerm*color9         : _color9
XTerm*color10        : _color10
XTerm*color11        : _color11
XTerm*color12        : _color12
XTerm*color13        : _color13
XTerm*color14        : _color14
XTerm*color15        : _color15
XTerm*colorBD        : _colorBD
XTerm*colorIT        : _colorIT
XTerm*colorUL        : _colorUL
XTerm*foreground     : _foreground
XTerm*background     : _background
XTerm*cursorColor    : _cursorColor

I don't understand it fully yet, but I am working on it. Once that was added, at the command line I added the changes to my setup with

xrdb -merge $HOME/.Xdefaults

killed the current xterm and created a new one. Nice. Dark brown, moody, earthy. Looks good.

Mutt was easy. I created a .mutt.gruvbox file and set it up like this:

# Colours
color attachment yellow default
color hdrdefault yellow default
color indicator black blue
color normal white default
color message brightblue default
color error brightred default
color tree brightwhite default
color signature brightcyan default
color quoted blue default
color markers red default
color bold brightblue default
color tilde green default
color search brightcyan default
color status black yellow
color underline brightmagenta default

and pointed to it at the end of my .muttrc with the line

source ~/.mutt.gruvbox

And that took effect immediately.

Midnight Commander caused me the most grief. But I made a start on it. I edited the file $HOME/.config/mc/ini and changed the line that defines base_color to be this (breaking it at some colons for readability):

base_color=green,default:normal=green,default:selected=black,green:
marked=yellow,default:markselect=white,green:errors=white,red:
reverse=black,lightgray:dnormal=white,default:dfocus=black,green:
dhotnormal=brightgreen,default:dhotfocus=brightgreen,green:
viewunderline=brightred,default:menunormal=black,green:menuhot=brown,black:
menusel=green,black:menuhotsel=brown,black:helpnormal=black,lightgray:
helpitalic=red,lightgray:helpbold=blue,lightgray:helplink=black,cyan:
helpslink=yellow,default:gauge=white,black:input=black,green:
directory=white,default:executable=brightgreen,default:
link=brightcyan,default:stalelink=brightred,default:
device=brightmagenta,default:core=red,default:special=black,default:
editnormal=lightgray,default:editbold=yellow,default:
editmarked=black,cyan:errdhotnormal=yellow,red:
errdhotfocus=yellow,lightgray:header=black,brown

In these ones, I use default a lot, to use the base background colour set in the shell. These are good starts, but in both mutt and Midnight Commander, there are dialog boxes and menu options that look terrible or are unreadable. As I find them, I will clean them up and eventually I will get a nice consistent colour scheme in all my command line work, a clean brown muddy earthy colour scheme that is gentle on my eyes.

Here's a screenshot showing one desktop window with three xterms open showing Midnight Commander, mutt and Vim editing a Python script.

Dull brown root window

0 comments