diff --git a/home/user/.zprofile b/home/user/.zprofile index 0a32608..e020aab 100644 --- a/home/user/.zprofile +++ b/home/user/.zprofile @@ -6,6 +6,10 @@ fi if systemctl -q is-active graphical.target && [[ $(tty) = "/dev/tty1" ]] && [[ -z $DISPLAY ]] && [[ $XDG_VTNR -eq 1 ]]; then exec startx >> ~/.xlogs 2>&1 -elif command -v tmux &>/dev/null && [[ $(tty) = "/dev/tty2" ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then +elif command -v tmux &>/dev/null && [[ $(tty) = "/dev/tty2" ]] && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then exec tmux new-session fi + +if [[ -n "$SSH_CLIENT" ]] && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then + exec tmux new-session -s ssh -A +fi