Computer ergonomics II – xterms colors
After the basic setup for the xterms colors are very important. My personal theory is that always looking at the same color tires the eyes. To avoid that I use some scripts to randomize the colors based on some basic patterns.
First I have the blackterm. This is a white on black setup, but with the white and black actually being randomized shades of grey. This way all the xterms look slightly different and can be easily visually distingushed. blackterm is my basic terminal that I’ve used for a long time.
Then I got the whiteterm. According to conventional wisdom black on white is easier to handle for the brain, although I am never sure I ever quite believed it. But still it’s useful I guess. whiteterm works the same way as blackterm and actually uses shades of grey, just the white and black are switched.
I typically try to combine both the black terms and the white terms in a single desktop, with giving priority to one of them depending on mood.
Then the final piece is the randterm. The idea and data file is originally from David Holland. randterm randomizes the foreground and background colors based on a data file. Some of the combinations are not so great (but I already eliminated most of the really awful ones), but most are ok. Sometimes when I don’t like a combination I start it a few times until I get one that matches my current mood. Typically I add one or two randterms to the stable of black and white terminals to make the desktop more visually interesting.
For all of those I have large (18 pixels) and small (10 pixels) variants. The scripts default to large and can be switched to small with the --small
argument.
Overall in a desktop menu you end up with 6 choices to create your xterm menu or shortcuts:
Color | Large | Small |
Black-on-White | blackterm |
blackterm --small |
White-on-Black | whiteterm |
whiteterm --small |
Random | randterm |
randterm --small |
With these choices you can set up a colorfull desktop that is easy on the eyes, like this:
The same idea can be applied to other programs. I used to do the same with Emacs windows, although currently I went back to mostly plain black on white Emacs.
One problem with the different schemes are terminal programs that use their own color schemes, like vim or lynx or emacs -nw. They typically have color schemes for dark or light xterms that you can statically configure, but do not really deal well with having both dark and light and even randomized. Often I just turn off the colors. An easy way to do that is to start them with TERM=vt100 … The programs often fall back to using bold instead of colors then, which works for me.
At least for vim I tended to also have aliases to start vim with a dark color set and a light color set, but you always have to remember to use the right alias then and it doesn’t quite work with programs that start the editor directly through $EDITOR
. So usually I just turn them off or rely on bold only.
I guess best would be wrappers that query the xterm on their current colors and select the right color schemes, but I haven’t implemented that so far.