commit 554c78530cb37b0e22ec272bdd4417664db2ef06
parent c9958fc0c25c30887aa41dcb2ae854df1d2ffcdd
Author: regexghost <dev@regexghost.com>
Date: Thu, 20 Aug 2026 21:53:51 +0100
added script to launch terminals with random title, useful for telling them apart in alt-tab
Diffstat:
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/jwm/.config/jwm/jwmrc b/jwm/.config/jwm/jwmrc
@@ -3,7 +3,7 @@
<!-- The root menu. -->
<RootMenu onroot="3">
- <Program icon="utilities-terminal" label="Terminal">st</Program>
+ <Program icon="utilities-terminal" label="Terminal">st-title</Program>
<Menu icon="folder" label="Applications">
<Program icon="sound" label="Audacious">audacious</Program>
<Program icon="calc" label="Calculator">xcalc</Program>
@@ -185,7 +185,7 @@
<Key mask="4S" key="bracketright">exec:~/.local/share/regexghost/wm-scripts/volume.sh --up --bluez</Key>
<Key mask="4S" key="slash">exec:~/.local/share/regexghost/wm-scripts/volume.sh --toggle-mute</Key>
<Key mask="4S" key="apostrophe">exec:~/.local/share/regexghost/wm-scripts/keyboard-settings.sh</Key>
- <Key mask="4" key="Return">exec:st</Key>
+ <Key mask="4" key="Return">exec:st-title</Key>
<Key mask="4S" key="Return">exec:xterm</Key>
<Key mask="4" key="b">exec:st -t htop -c htop -e htop</Key>
<Key mask="4" key="g">exec:st -t pulsemixer -c pulsemixer-e pulsemixer</Key>
diff --git a/terminal-scripts/Makefile b/terminal-scripts/Makefile
@@ -45,3 +45,4 @@ normal:
cp date-time.sh ${BIN}/date-time
cp qssh.sh ${BIN}/qssh
cp podcast-play.sh ${BIN}/podcast-play
+ cp st-title.sh ${BIN}/st-title
diff --git a/terminal-scripts/st-title.sh b/terminal-scripts/st-title.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Simple script to give each st window a random title from a list
+
+LIST="$XDG_CONFIG_HOME/regexghost/terminal-names.txt"
+
+name="$(cat "$LIST" | grep -v "^#" | shuf -n 1)"
+
+st -t "$name"