aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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