From 0705cf31108ecdd761620de53a92fae95189dd51 Mon Sep 17 00:00:00 2001 From: eKa Date: Wed, 18 Sep 2019 08:33:23 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B0=D0=B2=D1=82=D0=BE=D0=B7=D0=B0=D0=BF=D1=83=D1=81?= =?UTF-8?q?=D0=BA=20tmux=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B4=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=87=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=20SSH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index 19611e2..6dca6f0 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -97,3 +97,12 @@ fi # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" + +# Autostart tmux in SSH-session +if $(type tmux &>/dev/null); then + if [ -n "$SSH_CONNECTION" ]; then + if [ -z "$TMUX" ]; then + tmux attach -d || tmux new + fi + fi +fi