-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux
executable file
·50 lines (34 loc) · 1.34 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
#!/usr/bin/bash
set -e
SESSION_NAME="Memory Trainer"
tmuxAttachCommand=""
if [ "$TMUX" != "" ]; then
tmuxAttachCommand="tmux switch-client -t \"$SESSION_NAME:Editor\""
else
tmuxAttachCommand="tmux attach -t \"$SESSION_NAME:Editor\""
fi
if tmux has-session -t "$SESSION_NAME" 2> /dev/null; then
eval "$tmuxAttachCommand"
fi
tmux new-session -d -s "$SESSION_NAME"
tmux rename-window -t "$SESSION_NAME" "Server"
tmux send-keys -t "$SESSION_NAME" "cd clear; npm start" Enter
tmux split-window -t "$SESSION_NAME" -h
tmux send-keys -t "$SESSION_NAME" "cd server; clear; npm start" Enter
tmux new-window -t "$SESSION_NAME"
tmux rename-window -t "$SESSION_NAME" "Editor"
tmux send-keys -t "$SESSION_NAME" "cd frontend; nvim" Enter
tmux new-window -t "$SESSION_NAME"
tmux rename-window -t "$SESSION_NAME" "MariDB"
password="$HOME/.local/bin/get-password programming/mariadb/account-1"
username="$HOME/.local/bin/get-password programming/mariadb/account-1 'account'"
tmux send-keys -t "$SESSION_NAME" \
"mariadb --user=\"\`$username\`\" --password=\"\`$password\`\"" \
Enter
tmux new-window -t "$SESSION_NAME"
tmux rename-window -t "$SESSION_NAME" "Git"
tmux send-keys -t "$SESSION_NAME" "clear; wgs" Enter
tmux split-window -v
tmux send-keys -t "$SESSION_NAME" "clear" Enter
tmux send-keys -t "$SESSION_NAME" "g aa; g ce; g p; c"
eval "$tmuxAttachCommand"