From 014ffee924dc82f2c28d9cabcd3c508a8dabc39c Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Wed, 30 Nov 2011 16:57:47 -0500 Subject: [PATCH] Add a tmux plugin for some cool interoperability. --- plugins/tmux/tmux.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/tmux/tmux.plugin.zsh 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