Blob


1 # myterm
3 #!/bin/ksh
5 A wrapper script to launch xterm with a cute random background color.
7 Got the idea from deadpixi' sam fork (the editor), where one can pass a
8 list of colours as `background' and sam will use a random one.
10 I'm actually using the same list of the sam example configuration:
12 set -A colours white seashell oldlace lightcyan \
13 lightyellow mintcream snow thistle1 wheat \
14 azure lavenderblush bisque antiquewhite \
15 aliceblue lemonchiffon oldlace
17 ksh has not a great syntax for arrays, but this will choose (with modulo
18 bias!) a random colour and use it as xterm background.
20 exec xterm -bg "${colours[$((RANDOM % ${#colours[@]}))]}" "$@"