# If we're not in an ssh connection, and tmux is installed, and we're # not already in a tmux session, attach to the session named # 'default', and if the session does not exist, start one named # 'default' if [ -z "$SSH_CONNECTION" ]; then if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t default || tmux new -s default fi fi