-
Notifications
You must be signed in to change notification settings - Fork 2
/
aterm.pl
executable file
·38 lines (32 loc) · 951 Bytes
/
aterm.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl -w
# script to start aterm with a random transparency setting
#use strict
$numcolors = 6;
%colors = ( 1 => "blue",
2 => "green",
3 => "red",
4 => "yellow",
5 => "magenta",
6 => "cyan");
$numtypes = "11";
%types = ( 1 => "and",
2 => "andReverse",
3 => "andInverted",
4 => "xor",
5 => "or",
6 => "nor",
7 => "invert",
8 => "equiv",
9 => "orReverse",
10 => "orInverted",
11 => "nand");
srand time;
my $colorkey = int ( rand ($numcolors) +1);
my $typekey = int (rand ($numtypes) +1);
my $tint = $colors{$colorkey};
my $type = $types{$typekey};
if (scalar(@ARGV) > 0) {
exec("aterm -tr -tinttype $type -tint $tint &");
} else {
exec("aterm -tr -tinttype and -tint $tint & ");
}