Commit Diff

commit - b5950151a0af4adb67ef38cb360c476a2d94c970
commit + 8e69d76d264b2d8de6ba9bd81ddcf4dc8e78be82
blob - /dev/null
blob + 19820b846bd276674dc4fe7d4186e3080596f549 (mode 644)
--- /dev/null
+++ bin/myterm.lp
@@ -0,0 +1,18 @@
+# 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 gainsboro \
+		lightyellow mintcream snow lightblue thistle
+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 "$(echo ${colours[$((RANDOM % ${#colours[@]}))]})"
blob - 806e3fd3517dedb3fbbb3319314a773c3fcb7e8a
blob + d4b92878a97709af3fbeac8219932e1289cbb061
--- cwmrc.lp
+++ cwmrc.lp
@@ -16,7 +16,7 @@ First I have a list of applications for the built-in m
 	command iridium		iridium
 	command keepassxc	keepassxc
 	command lock		xlock
-	command term		xterm
+	command term		myterm
 I found these color by random I guess, but they're fine
@@ -127,7 +127,7 @@ basics window movements
 	bind-key 4-slash menu
-	bind-key CM-Return xterm # kitty
+	bind-key CM-Return myterm
 	bind-key C4-Return "emacsclient -c"
 	bind-key CS4-Return "env SHELL=rc 9term"
blob - 20ae214362cc5749199dc47268e97b528961096a
blob + f3d84b14f218d399e6dafdd885fe227f6e59b298
--- gen
+++ gen
@@ -72,6 +72,7 @@ pair bin/diffstat	bin/diffstat.lp	+x
 pair bin/gamemode	bin/gamemode.lp	+x
 pair bin/gmi2txt	bin/gmi2txt.lp	+x
 pair bin/mquote		bin/mquote.lp	+x
+pair bin/myterm		bin/myterm.lp	+x
 pair bin/nof		bin/nof.lp	+x
 pair bin/sshot		bin/sshot.lp	+x
 pair bin/template	bin/template.lp	+x