Skip to content

Instantly share code, notes, and snippets.

@hjue
Last active December 16, 2015 17:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hjue/5472530 to your computer and use it in GitHub Desktop.
Save hjue/5472530 to your computer and use it in GitHub Desktop.
my tmux shell
#!/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