tmux only through ssh/mosh

This commit is contained in:
Jonas H
2026-03-24 09:23:02 +01:00
parent 6514c8a319
commit cdac92dd88

View File

@@ -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
if [ -n "$SSH_CONNECTION" ] || [ -n "$MOSH_SOCK" ]; then
tmux new-session -As moshi
fi
fi