diff --git a/home/zsh.nix b/home/zsh.nix index 4ba9c48..c56583b 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -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 ''; }; }