From 571bbdfcbe05bdefcd6e321654df6361cf73f138 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 10 Oct 2022 13:48:07 +0200 Subject: [PATCH] tmux concept changed --- tmux_local | 3 --- tmux_ssh | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100755 tmux_local diff --git a/tmux_local b/tmux_local deleted file mode 100755 index b8e70bd..0000000 --- a/tmux_local +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# -tmux attach-session -t local || tmux new-session -s local diff --git a/tmux_ssh b/tmux_ssh index 7afd9a1..57a4c9c 100755 --- a/tmux_ssh +++ b/tmux_ssh @@ -1,3 +1,9 @@ #!/bin/sh # -tmux attach-session -t default_ssh || tmux new-session -s default_ssh +SESSION=$(tmux display-message -p '#S' 2> /dev/null) + +if [ "$SESSION" = "" ]; then + tmux attach-session -t default_ssh || tmux new-session -s default_ssh +fi + +