From ca19a7b3647d76fc1b55f1eacca0cf36000de131 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sat, 9 Oct 2021 01:06:57 -0400 Subject: [PATCH] irc: Add tic(1) -- ic(1) in tmux(1) This is a fun little extension of ic(1). I found it really annoying to have what I was typing double-shown to me (i.e. once I sent the message, it'd appear multiplexed with the stdin feed). One solution I found was to open a completely separate viewing panel in tmux(1) that would be tailing the log file, with only a 1 line prompt-panel for ic(1) (with its stdout redirected to /dev/null). This works really well, but was a pain to set up--tmux commands to the rescue! I was able to automate the panel setup in a new session, which is _so_ cool :) --- bin/tic | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/tic diff --git a/bin/tic b/bin/tic new file mode 100755 index 0000000..3e64535 --- /dev/null +++ b/bin/tic @@ -0,0 +1,7 @@ +#!/bin/sh +# tic -- ic(1) in tmux(1) +# argv is passed to ic! +tmux new-session \ + 'log="$HOME/.irc/$(date +%F).log"; touch $log && tail -f $log | siccolor' \; \ + split-pane "env NOCOLOR=1 ic $* >/dev/null" \; \ + resize-pane -y 1 -- libgit2 1.1.0