Adjusted tmux sections
This commit is contained in:
parent
5d5da09c0d
commit
364f981a58
2 changed files with 5 additions and 0 deletions
|
|
@ -143,6 +143,8 @@ def tmux_split_window(
|
|||
|
||||
def tmux_switch_client(target_session=None):
|
||||
"""Switch to target tmux session, or previous if none specified."""
|
||||
# DEPRECATED - Do nothing
|
||||
return
|
||||
cmd = ['tmux', 'switch-client']
|
||||
if target_session:
|
||||
cmd.extend(['-t', target_session])
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ function launch_in_tmux() {
|
|||
if [[ -n "${TMUX:-}" ]]; then
|
||||
# Running inside TMUX, switch to session
|
||||
tmux switch-client -t "$SESSION_NAME"
|
||||
if ! jobs %% >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# Running outside TMUX, attach to session
|
||||
tmux attach-session -t "$SESSION_NAME"
|
||||
|
|
|
|||
Loading…
Reference in a new issue