Files
3cloud-backend/tmux_2.sh
T
2025-06-29 09:26:38 +09:30

24 lines
688 B
Bash

#!/bin/bash
# Create a new tmux session named "dev2"
tmux new-session -d -s dev2
# Split the window vertically
tmux split-window -v
# Run commands in the first pane (pane 0)
tmux send-keys -t dev2:0.0 'source .venv/bin/activate' C-m
tmux send-keys -t dev2:0.0 'python3 worker/main.py' C-m # or whatever your dev command is
# Run commands in the second pane (pane 1)
tmux send-keys -t dev2:0.1 'source .venv/bin/activate' C-m
tmux send-keys -t dev2:0.1 'streamlit run streamlit_server.py ' C-m # or your editor of choice
tmux resize-pane -t dev2:0.0 -y 75% # Worker (75%)
tmux resize-pane -t dev2:0.1 -y 25% # Streamlit (25%)
# Attach to the tmux session
tmux attach -t dev2