Rounded some stuff out, add rtorrent support.

This commit is contained in:
Simon Gomizelj 2011-12-01 01:59:26 -05:00
commit 3ee16ddbbc

View file

@ -9,13 +9,26 @@ if (( $+commands[tmux] )); then
zstyle -a :omz:plugins:autostart state
[[ state == "on" && -z $TMUX ]] && exec tmux
# start an irc client in a tmux session
if [[ -n $IRC ]]; then
irc() {
if tmux has -t irc >/dev/null; then
tmux switch -t irc
[[ -n $TMUX ]] && tmux switch -t irc || tmux attach -t irc
else
TMUX="" tmux new -ds irc $IRC[1]
tmux switch -t irc
[[ -n $TMUX ]] && tmux switch -t irc || tmux attach -t irc
fi
}
fi
# start rtorrent in a tmux session
if [[ -n $RTORRENT ]]; then
torrents() {
if tmux has -t torrents >/dev/null; then
[[ -n $TMUX ]] && tmux switch -t torrents || tmux attach -t torrents
else
TMUX="" tmux new -ds torrents $RTORRENT[1]
[[ -n $TMUX ]] && tmux switch -t torrents || tmux attach -t torrents
fi
}
fi