From f31e39e5f5822255857032e060ee64919803e6b2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 21 Jan 2020 07:21:30 +0000 Subject: [PATCH] Always tmux-ing --- tag-zsh/zsh/configs/tmux.zsh | 9 +++++++++ tag-zsh/zshrc | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 tag-zsh/zsh/configs/tmux.zsh diff --git a/tag-zsh/zsh/configs/tmux.zsh b/tag-zsh/zsh/configs/tmux.zsh new file mode 100644 index 0000000..98a4386 --- /dev/null +++ b/tag-zsh/zsh/configs/tmux.zsh @@ -0,0 +1,9 @@ +_not_inside_tmux() { + [[ -z "$TMUX" ]] +} + +ensure_tmux_is_running() { + if _not_inside_tmux; then + tat + fi +} diff --git a/tag-zsh/zshrc b/tag-zsh/zshrc index c8273fe..a5185b3 100644 --- a/tag-zsh/zshrc +++ b/tag-zsh/zshrc @@ -15,5 +15,7 @@ for function in $HOME/.zsh/functions/*; do source $function done +ensure_tmux_is_running + # Local config [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local