diff --git a/zshrc/.zshrc b/zshrc/.zshrc index 833ffa6..2e68ef9 100644 --- a/zshrc/.zshrc +++ b/zshrc/.zshrc @@ -65,7 +65,8 @@ eval "$(pyenv init - zsh)" eval "$(starship init zsh)" eval "$(zoxide init zsh)" -# Attach to or create tmux session 'moshi' if tmux is installed and not already inside tmux if command -v tmux &>/dev/null && [ -z "$TMUX" ]; then - tmux new-session -As moshi -fi + if [ -n "$SSH_CONNECTION" ] || [ -n "$MOSH_SOCK" ]; then + tmux new-session -As moshi + fi +fi