diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh new file mode 100644 index 000000000..0ee652f97 --- /dev/null +++ b/plugins/tmux/tmux.plugin.zsh @@ -0,0 +1,17 @@ +# TODO: move elsewhere +IRC=($commands[weechat-curses] $commands[irssi]) + +if (( $+commands[tmux] )); then + [[ -z $TMUX ]] && exec tmux + + if [[ -n $IRC ]]; then + irc() { + if tmux has -t irc >/dev/null; then + tmux switch -t irc + else + TMUX="" tmux new -ds irc $IRC[1] + tmux switch -t irc + fi + } + fi +fi