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() {