-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.sh
executable file
·33 lines (25 loc) · 955 Bytes
/
dev.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
#!/bin/bash
###########################################################
# Starts all project processes in individual tmux panes
###########################################################
SESSION="jaykay-dev"
SPLIT=${SPLIT:-h} # Default split direction (horizontal)
# Start a new tmux session
tmux -2 new-session -d -s "$SESSION"
# Rename the first window and set up the first pane
tmux rename-window -t "$SESSION" "Project Processes"
# Pane 0: Tauri server
tmux select-pane -t 0
tmux send-keys "cd ./app && npm run tauri dev" C-m
tmux split-window -v
tmux select-pane -t 0
# Split horizontally for the second pane (frontend)
tmux split-window -"$SPLIT"
tmux select-pane -t 1
tmux send-keys "cd ./app/src && npm run dev" C-m
# Split vertically from Pane 0 for the third pane (backend)
tmux split-window -"$SPLIT"
tmux select-pane -t 2
tmux send-keys "cd ./backend && node index.js" C-m
# Attach to the session
tmux -2 attach-session -t "$SESSION"