From 14c659f616655c80feb1ce4d648466598491d1cd Mon Sep 17 00:00:00 2001 From: Jonathan Agmon Date: Sat, 28 Mar 2026 10:28:03 +0300 Subject: [PATCH] Add auto-tmux on ssh --- .bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bashrc b/.bashrc index 59ba312..ed78568 100644 --- a/.bashrc +++ b/.bashrc @@ -8,6 +8,11 @@ case $- in *) return;; esac +# Auto-launch tmux on SSH connection +if [[ -n "$SSH_CONNECTION" ]] && [[ -z "$TMUX" ]] && command -v tmux &> /dev/null; then + tmux attach-session -t default || tmux new-session -s default +fi + # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth