myterm

#!/bin/ksh

A wrapper script to launch xterm with a cute random background color.

Got the idea from deadpixi' sam fork (the editor), where one can pass a list of colours as `background' and sam will use a random one.

I'm actually using the same list of the sam example configuration:

set -A colours white seashell oldlace lightcyan \
	lightyellow mintcream snow thistle1 wheat \
	azure lavenderblush bisque antiquewhite \
	aliceblue lemonchiffon oldlace

ksh has not a great syntax for arrays, but this will choose (with modulo bias!) a random colour and use it as xterm background.

exec xterm -bg "${colours[$((RANDOM % ${#colours[@]}))]}" "$@"
Proxy Information
Original URL
gemini://dots.omarpolo.com/bin/myterm.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en
Capsule Response Time
462.059934 milliseconds
Gemini-to-HTML Time
0.1675 milliseconds

This content has been proxied by September (ba2dc).