2022-09-03 14:11:09 +03:00
|
|
|
# Launch tmux if logging in over ssh
|
|
|
|
if [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
2022-09-04 13:00:01 +03:00
|
|
|
if tmux has-session -t ssh_tmux 2>/dev/null; then
|
2022-09-03 14:11:09 +03:00
|
|
|
exec tmux -2 attach-session -t ssh_tmux
|
|
|
|
else
|
|
|
|
exec tmux -2 new-session -s ssh_tmux
|
|
|
|
fi
|
|
|
|
fi
|