[xmonad] colourful xterms

Anze Slosar anze at berkeley.edu
Thu Jun 4 16:33:54 EDT 2009


A couple of days a made a trivial hack that made me very happy, so I want 
to share the trick here. The trick is to start rxvt-unicode with

-bg \\#`randcolor.py` -fg \\#EEEEEE

where randcolor is a simple python script that returns a random hex color 
with rgb random in range(0..100) (to be dark enough for white font):

#!/usr/bin/env python
from random import *
rs=["%X"%(int(uniform(0,100))) for x in range(3)]
for x in rs:
     while len(x)<2:
print s

The outcome is that every term you start has slightly different shade of 
background. This not only makes your screen much more colourful and nice, 
but also helps with 0 or 1 pixel borders as terminals now clearly separate 
into areas on the screen of different colors so it is actually very 



phone: +1 (510) 495 2488, mobile: +1 (510) 289 9395, fax: +1 (510) 486 7149

-- "Speaking as a Jew on Christmas, I would be less shocked if Santa
Claus showed up to my house than if Bernie Madoff pulled off this
fraud alone." [Ron Geffner]

More information about the xmonad mailing list