-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux
executable file
·59 lines (47 loc) · 2.33 KB
/
.tmux
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
54
55
56
57
58
59
#!/bin/sh
set -e
# change this to the name of this project
TMUX_SESS_NAME=git-lab-rust
# change this to the name of the first tmux window
TMUX_WIN1_NAME=vim
TMUX_WIN2_NAME=shell
TMUX_WIN3_NAME=gitlab-lib
TMUX_WIN4_NAME=local-runners
TMUX_WIN5_NAME=rust-build-docker
export NVIM_LISTEN_ADDRESS=/tmp/nvimsocket.$TMUX_SESS_NAME
if tmux has-session -t=$TMUX_SESS_NAME 2> /dev/null; then
tmux attach -t $TMUX_SESS_NAME
exit
fi
tmux new-session -d -s $TMUX_SESS_NAME -n $TMUX_WIN1_NAME -x $(tput cols) -y $(tput lines)
# create vim window
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN1_NAME "vim -c CommandTBoot" Enter
# create shell split window
tmux new-window -n $TMUX_WIN2_NAME
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN2_NAME -h
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN2_NAME.right "git status" Enter
# create gitlab-lib window
tmux new-window -n $TMUX_WIN3_NAME
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN3_NAME "cd ~/Code/rust-projects/rust-gitlab/ " Enter
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN3_NAME "vim -c CommandTBoot" Enter
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN3_NAME -h
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN3_NAME "cd ~/Code/rust-projects/rust-gitlab/ " Enter
# create runners window
tmux new-window -n $TMUX_WIN4_NAME
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME "cd ~/Code/gitlab-runners-local/ " Enter
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME "vim -c CommandTBoot" Enter
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME -h
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME "htop " Enter
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME -v
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME "docker stats " Enter
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN4_NAME -v
# create build docker window
tmux new-window -n $TMUX_WIN5_NAME
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN5_NAME "cd ~/Code/rust-projects/rust-build-docker/ " Enter
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN5_NAME "vim -c CommandTBoot" Enter
tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN5_NAME -h
tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN5_NAME "cd ~/Code/rust-projects/rust-build-docker/ " Enter
tmux attach -t $TMUX_SESS_NAME:$TMUX_WIN1_NAME.1
# tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN1_NAME -h
# tmux send-keys -t $TMUX_SESS_NAME:$TMUX_WIN1_NAME.right "git status" Enter
# tmux split-window -t $TMUX_SESS_NAME:$TMUX_WIN1_NAME.2 -v