Re: random aterm tinting

Bartosz Wucke (
Wed, 10 Apr 2002 23:15:11 +0200 wrote:
> How do you get aterm to cycle through using different tints (red, blue, yellow)
>etc with each instance of aterm?  In Eterm you can do it with %random(red, blue, yellow).  

AFAIK you can't.

That's not a bad idea, but it would be unnecessary binary bloat.
I suggest using a starter script instead, like this:
(locking code shamelessly ripped from perlfaq5(3pm)

#!/usr/bin/perl -w

use Fcntl ':flock';

@colors=qw(red green blue magenta yellow cyan);


		#try using "2" instead of O_RDWR|O_CREAT if fails.
                                  or die "can't open $TINTFILE: $!";
   flock(FH, LOCK_EX)             or die "can't flock $TINTFILE: $!";
   $num = <FH> || 0;

   seek(FH, 0, 0)                 or die "can't rewind $TINTFILE: $!";
   truncate(FH,0)                or die "can't truncate $TINTFILE: $!";
   if($num>5 or $num<0){$num=0};
   (print FH "$num\n")            or die "can't write $TINTFILE: $!";
   flock(FH, LOCK_UN)             or die "can't flock $TINTFILE: $!";
   close FH                       or die "can't close $TINTFILE: $!";


#Change the params, font etc to your liking.

exec("aterm -tr -trsb -fg $color -tint $color -sr -st -sh 60 -fn 
  -fade 80 &") or die "Can't exec aterm: $!";

The AfterStep Window Manager for X User's Mailing List