mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Rounded some stuff out, add rtorrent support.
This commit is contained in:
parent
9452c2641e
commit
3ee16ddbbc
1 changed files with 15 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue