Last active
December 16, 2015 17:41
-
-
Save hjue/5472530 to your computer and use it in GitHub Desktop.
my tmux shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
cmd=$(which tmux) | |
session=hjue | |
if [ -z $cmd ]; then | |
echo "You need to install tmux." | |
exit 1 | |
fi | |
$cmd has -t $session | |
if [ $? != 0 ]; then | |
$cmd new -d -n mac -s $session | |
$cmd neww -n server -t $session \; split-window -h | |
$cmd neww -n phpgit -t $session "ssh phpgit" \; split-window -h | |
$cmd selectw -t $session:1 | |
fi | |
$cmd att -t $session | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment