From f4910cf7238f52256913ebd0302a47a1fc292f9d Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Wed, 1 Feb 2023 13:16:09 -0500 Subject: fix bug in tmcg --- bin/executable_tmcg | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/executable_tmcg b/bin/executable_tmcg index d94abbc..5ebb3cf 100755 --- a/bin/executable_tmcg +++ b/bin/executable_tmcg @@ -8,10 +8,12 @@ current_session () { } SESSION=$(current_session) +NEW=1 if [ "x${SESSION}" = "x" ]; then SESSION="irc" tmux new-session -s "${SESSION}" -d + NEW=$? fi if ! tmux switch -t ${SESSION}:catgirl >/dev/null 2>&1; then @@ -21,4 +23,7 @@ if ! tmux switch -t ${SESSION}:catgirl >/dev/null 2>&1; then tmux split-window -t ${SESSION}:catgirl -c '~' catgirl tilde tmux set-option -t ${SESSION}:catgirl remain-on-exit on tmux selectl -t ${SESSION}:catgirl tiled + if test ${NEW} -eq 0; then + tmux kill-window -t ${SESSION}:0 + fi fi -- cgit v1.2.3