aboutsummaryrefslogtreecommitdiffstats
path: root/bin/tmux-test
blob: ba0e5c6bb67a8afb4ba2e53034bcec978752b6b2 (plain)
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
49
50
51
52
53
#!/bin/bash

###this is going to split the pane into four 
###even horizontal panes
tmux split-window -v
sleep 1
tmux send-keys -t 0 "clear" C-m
tmux select-pane -t 0

tmux split-window -v
sleep 1
tmux select-pane -t 3

tmux split-window -v
sleep 1
tmux select-pane -t 5

tmux split-window -v
tmux select-layout even-vertical

 
###this will split each of the four panes
###vertically, resulting in eight seperate 
###panes

for i in 0 2 4 6 
do
tmux select-pane -t $i
tmux split-window -h
sleep 1
done


#this goes to each pane and sends a command, in this case - just identifies the pane. 

tmux select-pane -t 0
tmux send-keys -t 0 "This is pane 0" C-m
tmux select-pane -t 1
tmux send-keys -t 1 "This is pane 1" C-m
tmux select-pane -t 2
tmux send-keys -t 2 "This is pane 2" C-m
tmux select-pane -t 3
tmux send-keys -t 3 echo "This is pane 3" C-m
tmux select-pane -t 4
tmux send-keys -t 4 "This is pane 4" C-m
tmux select-pane -t 5
tmux send-keys -t 5 "This is pane 5" C-m
tmux select-pane -t 6
tmux send-keys -t 6 "This is pane 6" C-m
tmux select-pane -t 7
tmux send-keys -t 7 "This is pane 7" C-m
tmux select-pane -t 8
tmux send-keys -t 8 "This is pane 8" C-m