tmux-irc.sh (357B)
1 #!/bin/bash 2 SESSION=irc 3 echo "starting $SESSION tmux session" 4 export PATH=/usr/local/bin:$PATH 5 6 if ! tmux has-session -t "$SESSION" 7 then 8 9 # Create new session, name it, name the window, detach 10 tmux new-session -s "$SESSION" -d 11 tmux send-keys -t "$SESSION" "weechat; exit" C-m 12 tmux select-pane -t "$SESSION":1.1 13 14 fi 15 tmux attach -t "$SESSION"