-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux
executable file
·40 lines (27 loc) · 1.01 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
#!/usr/bin/bash
set -e
SESSION_NAME="Website"
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" "clear; hugo server" Enter
tmux split-window -h
tmux send-keys -t "$SESSION_NAME" "clear; bun tailwindcss -i ./assets/main.css -o ./assets/style.css --watch" Enter
tmux new-window -t "$SESSION_NAME"
tmux rename-window -t "$SESSION_NAME" "Editor"
tmux send-keys -t "$SESSION_NAME" "nvim" 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"