From 3b0e9fb43a6b7f68a702fd8aeab204de27eaf4d0 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Thu, 8 Oct 2015 18:08:12 +0200 Subject: [PATCH] Auto tmux --- zsh-autotmux/.zsh/99-autotmux.zsh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 zsh-autotmux/.zsh/99-autotmux.zsh diff --git a/zsh-autotmux/.zsh/99-autotmux.zsh b/zsh-autotmux/.zsh/99-autotmux.zsh new file mode 100644 index 0000000..4dee6ef --- /dev/null +++ b/zsh-autotmux/.zsh/99-autotmux.zsh @@ -0,0 +1,5 @@ +if [ -z "$TMUX" ]; then + if which tmux >/dev/null 2>&1; then + tmux -q has-session && exec tmux attach-session -d || exec tmux new-session + fi +fi