-- Leo's gemini proxy
-- Connecting to dots.omarpolo.com:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;lang=en
#!/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[@]}))]}" "$@"
-- Response ended
-- Page fetched on Sat Apr 27 06:25:03 2024