Last active
May 20, 2019 17:41
-
-
Save tennisonchan/350bd5029e7553fe655815c5db0d00ae to your computer and use it in GitHub Desktop.
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 | |
# | |
# Setup a work space called `pinboard` with one window and 3 panes. | |
# | |
SESSION_NAME="ads-eng" | |
WINDON_NAME="pinboard" | |
# check if session already exists | |
tmux has-session -t ${SESSION_NAME} | |
if [ $? != 0 ] | |
then | |
# set up tmux | |
tmux start-server | |
# create a new tmux session, starting vim from a saved session in the new window | |
tmux new-session -d -s ${SESSION_NAME} -n ${WINDON_NAME} | |
# select pane 0, run sterling | |
tmux selectp -t 0 | |
# split pane 0 horizontal | |
tmux split-window -h | |
# select pane 1, run optimun | |
tmux selectp -t 1 | |
# split pane 1 vertiacally | |
tmux split-window -v -t ${SESSION_NAME}:0.1 | |
fi | |
tmux send-keys -t ${SESSION_NAME}:0.1 "dev" C-m | |
tmux send-keys -t ${SESSION_NAME}:0.1 "opt" C-m | |
tmux send-keys -t ${SESSION_NAME}:0.0 "dev" C-m | |
tmux send-keys -t ${SESSION_NAME}:0.0 "pin" C-m | |
tmux send-keys -t ${SESSION_NAME}:0.2 "dev" C-m | |
tmux send-keys -t ${SESSION_NAME}:0.2 "bulk" C-m | |
tmux selectp -t 0 | |
# Finished setup, attach to the tmux session! | |
tmux attach-session -t ${SESSION_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment