[xmonad] colourful xterms

Sergey Manucharian sergey at ingeniware.com
Thu Jun 4 18:55:24 EDT 2009


On Thu, 4 Jun 2009 16:39:38 -0600
Sergey Manucharian <sergey at ingeniware.com> wrote:
.....
> -------------------------8<-------------------------
> #!/bin/bash
> R_BASE=32768
> G_BASE=32768
> B_BASE=32768
> 
> `printf "xterm -bg rgb:%04x/%04x/%04x\n" $(($R_BASE+$RANDOM))
> $(($G_BASE+$RANDOM)) $(($B_BASE+$RANDOM))`
> -------------------------8<-------------------------

My previous example is closer to white, to make it darker:
-------------------------8<-------------------------
#!/bin/bash
R_BASE=16384
G_BASE=16384
B_BASE=16384
SC=2		# scale factor, num of bits to shift

`printf "xterm -bg rgb:%04x/%04x/%04x\n" $(($R_BASE+($RANDOM>>$SC)))
$(($G_BASE+($RANDOM>>$SC))) $(($B_BASE+($RANDOM>>$SC)))`
-------------------------8<-------------------------

Cheers,
Sergey


More information about the xmonad mailing list