tmuxen (524B)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/bin/sh # # name : tmuxen, tmux environment made easy # author : Xu Xiaodong <[email protected]> # license : GPL # created : 2012 Jul 01 # modified : 2016 Nov 12 # cmd=$(which tmux) # tmux path session=$(hostname -s) # session name if [ -z $cmd ]; then echo "You need to install tmux." exit 1 fi $cmd has -t $session 2> /dev/null if [ $? -ne 0 ]; then $cmd new -d -n irc -s $session "irssi" $cmd neww -n zsh -t $session "zsh" $cmd selectw -t $session:2 fi $cmd att -t $session exit 0 |