From 4b73e35977e86296c2da889470f39673c5e124b8 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 2 Dec 2016 12:49:33 -0500 Subject: [PATCH] Simplify tmux auto start code that was probably actually important, and I'll regret it later --- .zshrc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) 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 + +