3 sub getRandomColor
() {
4 sprintf("#%06x", int(rand(256*256*256)));
8 $colorN = 3 unless defined $colorN && $colorN =~ /^\d+$/;
11 # don't use this perl 5.004 "my" construct in public scripts
12 for my $i (1 .. $colorN) { push @colors, getRandomColor
(); }
13 # don't use this perl 5.005 "for" construct in public scripts
14 #push @colors, getRandomColor() for (1 .. $colorN);
16 my $colorStr = join(',', @colors);
17 print(qq(Colors used
: "$colorStr"\n));
18 my $dir = `fvwm-themes-config --show-dir --theme migo`; chomp($dir);
19 system(qq(fvwm
-themes
-images
--in-file
$dir/images/background
/trefoil
.xpm
--setroot
--colorize
--colorize
-colors
"$colorStr"));