aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2023-02-01 13:16:09 -0500
committerRyan Kavanagh <rak@rak.ac>2023-02-01 13:16:09 -0500
commitf4910cf7238f52256913ebd0302a47a1fc292f9d (patch)
tree7518427a8c559423bc9d0c7a5f05bf4d47fad52d /bin
parentopenbsd packages (diff)
fix bug in tmcg
Diffstat (limited to 'bin')
-rwxr-xr-xbin/executable_tmcg5
1 files changed, 5 insertions, 0 deletions
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