Skip to content

Commit b44d74d

Browse files
committed
add convenience tmux.sh
1 parent 01865ab commit b44d74d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tmux.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Session Name
2+
session="NPT"
3+
4+
# Start New Session with our name
5+
tmux new-session -d -s $session
6+
7+
# Name first Window
8+
tmux rename-window -t 0 'npt'
9+
10+
# Setup Snowpack window
11+
tmux split-window -h
12+
tmux select-pane -t 0
13+
tmux split-window -v
14+
tmux select-pane -t 2
15+
tmux split-window -v
16+
tmux select-pane -t 2
17+
18+
tmux send-keys -t "$session:npt.0" "npm run start" C-m
19+
tmux send-keys -t "$session:npt.1" 'jupyter notebook' C-m
20+
tmux send-keys -t "$session:npt.2" 'source ./nptenv/bin/activate' C-m
21+
tmux send-keys -t "$session:npt.2" 'npm run startapp' C-m
22+
tmux send-keys -t "$session:npt.3" 'wsl-open http://localhost:50001/' C-m
23+
tmux send-keys -t "$session:npt.3" 'wsl-open http://localhost:8888/notebooks/test-notebook.ipynb' C-m
24+
25+
tmux attach -t $session

0 commit comments

Comments
 (0)