While `xduplic-copier' is awesome, it doesn't work with terminal
emulators built against GTK 3 for bogus `security' reasons. Also,
typically, I want to start lots of terminals starting out doing slightly
different things.
Anyway, this is a simple which opens a bunch of suitable terminals based
on tags provided on the command line.
SCRIPTLINKS += play-rawk
SCRIPTLINKS += media-keys
SCRIPTLINKS += disorder-notify
SCRIPTLINKS += play-rawk
SCRIPTLINKS += media-keys
SCRIPTLINKS += disorder-notify
+SCRIPTLINKS += xduplic-terminal
DOTCPP += .Xdefaults
Xdefaults_DEFS = -DEMACSWD=$(call mdw-conf,emacs-width,77)
DOTCPP += .Xdefaults
Xdefaults_DEFS = -DEMACSWD=$(call mdw-conf,emacs-width,77)
--- /dev/null
+#! /usr/bin/zsh -e
+### make terminals suitable for xduplic-copier
+
+prog=${0##*/}
+usage () { echo "usage: $prog TAG ... -- COMMAND ARGS"; }
+
+typeset -a tags cmd c
+typeset -i i=1
+typeset tag
+
+for ((; i <= $#; i++)); do
+ if [[ $@[i] = "--" ]]; then break; fi
+ tags+=($@[i])
+done
+if (( i > $# )); then usage >&2; exit 2; fi
+i+=1
+for ((; i <= $#; i++)); do cmd+=($@[i]); done
+
+for tag in $tags; do
+ c=(${cmd//{}/$tag})
+ xterm -xrm "XTerm*allowSendEvents: true" \
+ -geometry 80x35 -title "xduplic: $c" \
+ -e $c&
+done
+sleep 0.5
+xduplic-copier&
+wait