From 3742f9b787ecd439308bd812eec7b13bbe765fd3 Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Sat, 22 Feb 2020 19:56:50 +1300 Subject: [PATCH] feat: auto-start tmux if it isn't already open --- zsh/.config/zsh/zshrc.local | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/.config/zsh/zshrc.local b/zsh/.config/zsh/zshrc.local index ed6d986..87a30a6 100644 --- a/zsh/.config/zsh/zshrc.local +++ b/zsh/.config/zsh/zshrc.local @@ -18,6 +18,11 @@ if command -v tmux &> /dev/null; then ssh-tmux(){ ssh -t "$@" "tmux attach || tmux new"; } + + # auto-start tmux + if [ -z "${TMUX}" ]; then + tmux -f ~/.config/tmux/tmux.conf + fi fi # rust/cargo