From cdac92dd8809d4733bab2fddf46249e3b23293b4 Mon Sep 17 00:00:00 2001 From: Jonas H Date: Tue, 24 Mar 2026 09:23:02 +0100 Subject: [PATCH] tmux only through ssh/mosh --- zshrc/.zshrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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