@@ -10,27 +10,33 @@ if [ $? != 0 ]; then
1010 tmux set-window-option automatic-rename off
1111 tmux set pane-border-status top
1212 tmux set pane-border-format " #{pane_index} - #{pane_title} "
13+
14+ # Some users set 1 as the pane-base-index instead of 0 by default
15+ index=$( tmux show-options -gv pane-base-index)
1316
1417 tmux split-window -h
1518 tmux split-window -v
16- tmux select-pane -t 1
19+ tmux select-pane -t $index
1720 tmux split-window -v
1821
19- tmux select-pane -t 1 -T " HARDHAT RPC"
20- tmux send-keys -t 1 ' cd contracts' Enter
21- tmux send-keys -t 1 ' yarn start-local'
22-
23- tmux select-pane -t 2 -T " GRAPH NODE"
24- tmux send-keys -t 2 ' cd subgraph' Enter
25- tmux send-keys -t 2 ' yarn start-local-indexer'
26-
27- tmux select-pane -t 3 -T " SUBGRAPH DEPLOY"
28- tmux send-keys -t 3 ' cd subgraph' Enter
29- tmux send-keys -t 3 ' yarn rebuild-deploy-local'
30-
31- tmux select-pane -t 4 -T " WEB"
32- tmux send-keys -t 4 ' cd web' Enter
33- tmux send-keys -t 4 ' yarn start-local'
22+ tmux select-pane -t $index -T " HARDHAT RPC"
23+ tmux send-keys -t $index ' cd contracts' Enter
24+ tmux send-keys -t $index ' yarn start-local'
25+
26+ (( ++ index ))
27+ tmux select-pane -t $index -T " GRAPH NODE"
28+ tmux send-keys -t $index ' cd subgraph' Enter
29+ tmux send-keys -t $index ' yarn start-local-indexer'
30+
31+ (( ++ index ))
32+ tmux select-pane -t $index -T " SUBGRAPH DEPLOY"
33+ tmux send-keys -t $index ' cd subgraph' Enter
34+ tmux send-keys -t $index ' yarn rebuild-deploy-local'
35+
36+ (( ++ index ))
37+ tmux select-pane -t $index -T " WEB"
38+ tmux send-keys -t $index ' cd web' Enter
39+ tmux send-keys -t $index ' yarn start-local'
3440fi
3541
3642tmux attach-session -t $session
0 commit comments