home/zsh: execute tmux on ssh

This commit is contained in:
Asmir A 2023-11-19 12:09:51 +01:00
parent 30fe47b03d
commit a756a9fa7e
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -99,6 +99,10 @@
eval "$(direnv hook zsh)"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t $USER || tmux new-session -s $USER
fi
'';
};
}