-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtmux.sh
More file actions
executable file
·29 lines (24 loc) · 800 Bytes
/
tmux.sh
File metadata and controls
executable file
·29 lines (24 loc) · 800 Bytes
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
#!/bin/bash
export SESS=quack
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$DIR"
tmux ls | grep $SESS
if [ $? -ne 0 ]
then
# Tab 1: nvim
tmux new-session -d -s $SESS -n "nvim" -c "$DIR"
tmux send-keys -t $SESS:1 'nvim' C-m
# Tab 2: claude
tmux new-window -t $SESS -n "claude" -c "$DIR"
tmux send-keys -t $SESS:2 'claude --dangerously-skip-permissions' C-m
# Tab 3: dev servers (3 panes)
tmux new-window -t $SESS -n "dev" -c "$DIR"
tmux send-keys -t $SESS:3 'cd app && npm run dev' C-m
tmux split-window -h -t $SESS:3 -c "$DIR"
tmux send-keys -t $SESS:3.2 'deno task dev' C-m
tmux split-window -v -t $SESS:3.2 -c "$DIR"
tmux send-keys -t $SESS:3.3 'cd app && npm run storybook' C-m
# Select first tab
tmux select-window -t $SESS:1
fi
tmux attach -t $SESS