diff --git a/zsh/.zshrc.d/prompt b/zsh/.zshrc.d/prompt index 453be3d..1620e10 100644 --- a/zsh/.zshrc.d/prompt +++ b/zsh/.zshrc.d/prompt @@ -16,6 +16,15 @@ else eval `dircolors ~/.dircolors/dircolors.ansi-dark` fi 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 +fi + + + if [ -z "$SSH_AUTH_SOCK" ] ; then eval `ssh-agent -s` fi