Skip to content

Instantly share code, notes, and snippets.

@BenjaminConant
Created January 15, 2017 03:19
Show Gist options
  • Save BenjaminConant/b59aa6e0cac970676160d706709db3bf to your computer and use it in GitHub Desktop.
Save BenjaminConant/b59aa6e0cac970676160d706709db3bf to your computer and use it in GitHub Desktop.
#!/bin/bash
SESSION='MyFin'
#create new session and then detach from it
tmux -2 new-session -d -s $SESSION
#create a new window called ace
tmux new-window -t $SESSION:1 -n 'ace'
#split the ace window first vertically
tmux split-window -v
#split the ace window horizontally
tmux select-pane -t 0
tmux split-window -h
tmux select-pane -t 0
tmux split-window -h
tmux select-pane -t 1
tmux split-window -h
#top left pane of ace window
tmux select-pane -t 0
tmux send-keys "cd ace" C-m
tmux send-keys "npm start" C-m
#run gulp in top left pane of ace window
tmux select-pane -t 1
tmux send-keys "cd ace" C-m
tmux send-keys "clear" C-m
tmux send-keys "gulp" C-m
tmux resize-pane -R 20
#run gulp in top left pane of ace window
tmux select-pane -t 2
tmux send-keys "cd cashier" C-m
tmux send-keys "clear" C-m
tmux send-keys "nodemon app.js" C-m
tmux resize-pane -R 40
#run gulp in top left pane of ace window
tmux select-pane -t 3
tmux send-keys "cd ace" C-m
tmux send-keys "git status" C-m
tmux resize-pane -R 20
#bottom pane
tmux select-pane -t 4
tmux send-keys "cd ace" C-m
tmux send-keys "heroku logs --tail --app immense-badlands-77643" C-m
tmux resize-pane -D 10
#create a new window called joker
tmux new-window -t $SESSION:2 -n 'joker'
#split the joker window first vertically
tmux split-window -v
#split the joker window horixontally
tmux select-pane -t 0
tmux split-window -h
#top left pane of joker window
tmux select-pane -t 0
tmux send-keys "cd joker" C-m
#cd into joker
tmux select-pane -t 1
tmux send-keys "cd joker" C-m
tmux send-keys "clear" C-m
#bottom pane
tmux select-pane -t 2
tmux send-keys "cd joker" C-m
tmux send-keys "clear" C-m
#create a new window called dealer
tmux new-window -t $SESSION:3 -n 'dealer'
tmux select-pane -t 0
tmux send-keys "cd dealer" C-m
tmux send-keys "clear" C-m
#create a new window called house
tmux new-window -t $SESSION:4 -n 'house'
tmux select-pane -t 0
tmux send-keys "cd house" C-m
#create a new window called scripts
tmux new-window -t $SESSION:5 -n 'scripts'
tmux select-pane -t 0
tmux send-keys "cd scripts" C-m
tmux send-keys "clear" C-m
#create a new window called models
tmux new-window -t $SESSION:6 -n 'models'
tmux select-pane -t 0
tmux send-keys "cd myFinModels" C-m
tmux send-keys "clear" C-m
#create a new window called models
tmux new-window -t $SESSION:7 -n 'jack'
tmux select-pane -t 0
tmux send-keys "cd jack" C-m
tmux send-keys "clear" C-m
tmux select-pane -t 0
tmux split-window -h
tmux select-pane -t 1
tmux send-keys "cd jack" C-m
tmux send-keys "clear" C-m
#create a new window called models
tmux new-window -t $SESSION:8 -n 'palm'
tmux select-pane -t 0
tmux send-keys "cd palm" C-m
tmux send-keys "clear" C-m
#kill window 0 which is unamed and unused
tmux -2 kill-window -t :0
#attach to the new session
tmux select-window -t $SESSION:1
tmux attach-session -t $SESSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment