-
Notifications
You must be signed in to change notification settings - Fork 0
/
.hatch.sh
50 lines (33 loc) · 1.12 KB
/
.hatch.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
49
#!/bin/bash
# Personal Workspace setup script
# Author: Krishna Murti
clear
SESS_OFFICIAL="off-job"
SESS_PERSONAL="tenx-job"
tmux has-session -t $SESS_OFFICIAL 2>/dev/null
if [ $? != 0 ]; then
mkdir ~/my_work
tmux new-session -d -s $SESS_OFFICIAL -n "dev"
tmux send-keys -t $SESS_OFFICIAL:dev "cd ~/my_work" C-m
tmux send-keys -t $SESS_OFFICIAL:dev "nv" C-m
tmux split-window -h
tmux send-keys -t $SESS_OFFICIAL:dev.2 "cd ~/my_work" C-m
tmux select-pane -t 1
tmux new-window -t $SESS_OFFICIAL -n "devops"
tmux send-keys -t $SESS_OFFICIAL:devops "cd ~/my_work" C-m
tmux split-window -h
tmux split-window -h
tmux select-pane -t 1
mkdir ~/my_work_2
tmux new-window -t $SESS_OFFICIAL -n "test-drive"
tmux send-keys -t $SESS_OFFICIAL:test-drive "cd ~/my_work_2" C-m
tmux split-window -h
tmux send-keys -t $SESS_OFFICIAL:test-drive.2 "cd ~/my_work_2" C-m
tmux split-window -v
tmux send-keys -t $SESS_OFFICIAL:test-drive.3 "cd ~/my_work_2" C-m
tmux select-pane -t 1
tmux split-window -v
tmux select-pane -t 1
tmux select-window -t $SESS_OFFICIAL:dev
fi
tmux -u attach-session -t $SESS_OFFICIAL