Created
May 19, 2015 22:09
-
-
Save jnd71/569559ae512f6cf7b662 to your computer and use it in GitHub Desktop.
Basic Tmux Script
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
#! /usr/bin env bash | |
SESSION_NAME="" | |
tmux has-session -t $SESSION_NAME &> /dev/null | |
if [ $? -ne "0" ] | |
then | |
tmux new-session -d -s $SESSION_NAME | |
tmux split-window -h -p 40 | |
tmux split-window -v -p 40 | |
tmux send-keys -t 0 "vim" C-m | |
tmux send-keys -t 1 "./sbt" C-m | |
tmux select-pane -t 0 | |
fi | |
tmux attach -t $SESSION_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not make this generic and take a parameter from the command line? Then you can put this in your
~/bin
or whatever.Line 3 maybe becomes something that looks like this:
Being generic you wouldn't want the
sbt
command up in there, so maybe you go with a BOTH sort of thing.