diff --git a/.zshrc b/.zshrc index 0171800..66be8b1 100644 --- a/.zshrc +++ b/.zshrc @@ -43,18 +43,12 @@ unalias run-help autoload run-help # Auto start tmux if a remote connection -if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && [[ -n "$SSH_TTY" ]] +if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -n "$SSH_TTY" ]] then - tmux_session='zim' - tmux start-server - # Create a 'prezto' session if no session has been defined in tmux.conf. - if ! tmux has-session 2> /dev/null; then - tmux \ - new-session -d -s "$tmux_session" \; \ - set-option -t "$tmux_session" destroy-unattached off &> /dev/null - fi - - # Attach only to the prezto session - exec tmux new-session -A -s $tmux_session + # Attach only to the 'auto' session + exec tmux new-session -A -s 'auto' fi + fi + +