Re: Random aterm colors...

Michael Stenner (mstenner@phy.duke.edu)
Wed, 21 Apr 1999 09:41:20 -0400 (EDT)


On Mon, 19 Apr 1999, Dast wrote:

>Here is a simple script to start an aterm with a random color if anyone is
>interested.  Wanted something to do this and thought I might share it with
>the world.
>--Dast

So, I know everybody has their own favorite way to do all of these
things, but if people are indeed interested in theis sort of thing...
the way I do it is to have a file named ".aterm_colors" containing
something like:

grey60
red
blue
violet
green

and use the little perl script "randcolor"

#!/usr/local/bin/perl
open COLORFILE, "$ENV{'HOME'}/.aterm_colors";
@colorlist = <COLORFILE>;
close COLORFILE;
print "$colorlist[int(rand(@colorlist))]";

when I start aterm, (it's bound to a key) I use the command (in bash)
aterm -tr -tint $(randcolor)

it's very easy to add and remove colors - and the color file doesn't
contain any code to clutter things.

					-Michael



  Michael Stenner			Office Phone: 919-660-2513
  Duke University, Dept. of Physics	  mstenner@phy.duke.edu
  Box 90305, Durham N.C. 27708-0305


--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.caldera.com/linuxcenter/forums/afterstep.html