add tmux default launch

This commit is contained in:
vincent 2022-04-05 22:10:22 +02:00
parent 7ebce5c384
commit 2bcea02c91

View File

@ -19,8 +19,9 @@ zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#launch tmux on ssh connection
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
##if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]]; then
tmux attach-session -t $(hostname) || tmux new-session -s $(hostname)
fi