-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.sh
executable file
·48 lines (36 loc) · 1.05 KB
/
tmux.sh
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
46
47
48
#!/bin/sh
session="mir"
# Check if the session exists
tmux has-session -t $session 2>/dev/null
# If the session exists, kill it
if [ $? -eq 0 ]; then
tmux attach-session -t $session
#tmux kill-session -t $session
exit
fi
tmux new-session -d -s $session
window=0
tmux split-window -h -p 50
tmux split-window -v -p 50
tmux split-window -h -p 75
tmux select-pane -t 2
tmux split-window -h -p 75
tmux select-pane -t 1
tmux send-keys 'make oxi'
tmux select-pane -t 2
tmux send-keys 'make redox'
tmux select-pane -t 3
tmux send-keys 'make rabbit' C-m
tmux select-pane -t 4
tmux send-keys 'make flux'
tmux select-pane -t 5
tmux send-keys 'make db' C-m
#window=1
#tmux new-window -t $session:$window -n 'redox'
#tmux send-keys -t $session:$window 'vim package.json'
#window=2
#tmux new-window -t $session:$window -n 'flux'
#window=3
#tmux new-window -t $session:$window -n 'rabbit'
#tmux send-keys -t $session:$window 'npm run serve'
tmux attach-session -t $session