-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathide
executable file
·45 lines (35 loc) · 1.5 KB
/
ide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Setup a work space called `WEBRTC` with 5 windows 1-2-2
# first window has 1 pane.
# The first pane set at 65%, split vertically, set to root and running vim
# pane 2 is split vertically at 25% and 50% horizontally running `npm run watch/styles`
# pane 3 is split vertically at 25% and 50% horizontally running `npm run watch/scripts`
# pane 3 is split vertically at 10% and 50% horizontally running `npm run watch/templates`
# pane 4 is split vertically at 10% and 50% horizontally running `npm run watch/browser`
# note: `api` aliased to `cd ~/path/to/work`
session='STURN'
NVM='nvm use 8'
# 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 -sSTURN
# # Select pane 0 run vim
tmux select-pane -t 0
tmux send-keys "vim -c 'NERDTree'" C-m
# Split pane 0 vertically by 70%
tmux split-window -t 0 -v -p 30 -c "$(pwd)"
tmux select-pane -t 1
tmux send-keys "$NVM;npm run watch/templates" C-m # watch/templates
# Split pane 1 vertically by 50%
tmux split-window -t 1 -v -p 50 -c "$(pwd)"
tmux select-pane -t 2
tmux send-keys "$NVM;npm run watch/styles" C-m # watch/styles
# Split pane 1 horizontally by 50%
tmux split-window -t 1 -h -p 50 -c "$(pwd)"
tmux select-pane -t 2
tmux send-keys "$NVM;npm run watch/scripts" C-m # watch/scripts
# Split pane 2 horizontally by 50%
tmux split-window -t 3 -h -p 50 -c "$(pwd)"
tmux select-pane -t 4
tmux send-keys "$NVM;bin/browse" C-m # watch/browser
tmux -2 attach -t $session