@@ -10,27 +10,33 @@ if [ $? != 0 ]; then
10
10
tmux set-window-option automatic-rename off
11
11
tmux set pane-border-status top
12
12
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)
13
16
14
17
tmux split-window -h
15
18
tmux split-window -v
16
- tmux select-pane -t 1
19
+ tmux select-pane -t $index
17
20
tmux split-window -v
18
21
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'
34
40
fi
35
41
36
42
tmux attach-session -t $session
0 commit comments