hysteria

ii wrapper script
git clone git://git.2f30.org/hysteria.git
Log | Files | Refs | README | LICENSE

commit 5cb9c60a47004671cade53a463cae5c0433cb676
parent 467158f9eedd92c8b778eb632608fb4b390100e5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue Oct 28 20:34:06 +0000

add customizable inputcmd

By default the inputcmd is still cat. Expose some variables to allow
easier scripting. The config now has a commented example with sob which
supports history and nickname completion, a custom prompt and much more.

Diffstat:
config | 3+++
monitor | 15+++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/config b/config @@ -4,3 +4,6 @@ hosts="irc.network.org:6667 irc.network-other.org:6667" channels="irc.network.org:#channel irc.network-other.org:#channel" ircdir="irc" session="hysteria" +#inputcmd='HISTORYFILE="$(dirname ${INFILE})/history" OUTFILE="$OUTFILE" \ +# sob -p "${CHAN}> " | \ +# tee -a "$(dirname ${INFILE})/history" >> "$INFILE"' diff --git a/monitor b/monitor @@ -24,10 +24,17 @@ while :; do fi done if test $found -eq 0; then - infile="$n" - outfile="$(dirname $n)/out" - tmux new-window "tail -f '$outfile' | ./highlight" - tmux split-window -p 1 "cat > '$infile'" + INFILE="$(readlink -f $n)" + NDIR="$(dirname ${INFILE})" + OUTFILE="${NDIR}/out" + CHAN="$(basename ${NDIR})" + # default inputcmd if not set in config. + if test x"${inputcmd}" = x""; then + inputcmd='cat >> "$INFILE"' + fi + tmux new-window "tail -f '$OUTFILE' | ./highlight" + tmux split-window -v -p 1 "tmux resize-pane -y 4; \ + CHAN='$CHAN' INFILE='$INFILE' OUTFILE='$OUTFILE' eval '$inputcmd'" tmux rename-window "$title" fi done