From aa5c0bcf1446075f6c8ec83f77beda9d69d653e8 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Thu, 1 Dec 2011 01:45:19 -0500 Subject: [PATCH] Rework tmux plugin a bit --- lib/defaults.vim | 3 +++ plugins/tmux/tmux.plugin.zsh | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 lib/defaults.vim diff --git a/lib/defaults.vim b/lib/defaults.vim new file mode 100644 index 000000000..e118085cc --- /dev/null +++ b/lib/defaults.vim @@ -0,0 +1,3 @@ +# Default applications + +IRC=($commands[weechat-curses] $commands[irssi]) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 76f688cf2..eb13a7603 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -1,8 +1,13 @@ -# TODO: move elsewhere -IRC=($commands[weechat-curses] $commands[irssi]) +# Enable autostarting of tmux with: +# +# zstyle :omz:plugins:tmux autostart on +# if (( $+commands[tmux] )); then - [[ -z $TMUX ]] && exec tmux + local state + + zstyle -a :omz:plugins:autostart state + [[ state == "on" && -z $TMUX ]] && exec tmux if [[ -n $IRC ]]; then irc() {