Gör ett script av nedanstående kåd o kör i din ~/.profile eller motsvarande för ditt skal.
#!/usr/bin/perl
# A script for the Apple Terminal on MacOS X which edits the
# com.apple.Terminal.plist in your preferences folder to provide you
# with a random tint for each terminal.
use strict;
my $defaults = "/usr/bin/defaults";
my $domain = "com.apple.Terminal";
my $TextColors = `$defaults read $domain TextColors`;
my $TerminalOpaqueness = `$defaults read $domain TerminalOpaqueness`;
my $i = '\d\.\d\d\d\s'; # float 1.3 regexp
my $cg = "$i$i$i"; # three of the above in a row
chomp $TextColors; chomp $TerminalOpaqueness;
system("$defaults write $domain TerminalOpaqueness 0.80")
if ($TerminalOpaqueness != 0.80);
# dump each float triplicate into an array
my $x = 0;
my @color = ();
while ($TextColors =~ /($cg)/g) { $color[$x] = $1; $x++}
# array element 4 is the one we want to randomize. The higher (closer
# to 1) they are, the more vibrant the colors will be. Lower numbers
# will cause more bland colors.
$color[4] =
sprintf ("%.4f %.4f %.4f ", rand(0.2), rand(0.2), rand(0.2));
# make a new string
my $newTextColors = undef;
for (@color) { $newTextColors .= $_ }
# write the string
system("$defaults write $domain TextColors \"$newTextColors\"");