Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@JohnPreston
Created September 3, 2019 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnPreston/4d517c9c172ead6a5566395f83f2220c to your computer and use it in GitHub Desktop.
Save JohnPreston/4d517c9c172ead6a5566395f83f2220c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# creates a new TMUX session and opens windows in predefined folders, and for python, activates virtual environment
session=v2
tmux new-session -s $session\; \
send-keys 'cd /home/john/work/pe_v2_common' C-m \; \
send-keys 'source .venv/bin/activate' C-m \; \
new-window -t $session:1 \; \
send-keys 'cd /home/john/work/pe_v2_core' C-m\; \
send-keys 'source .venv/bin/activate' C-m \; \
new-window -t $session:2 \; \
send-keys 'cd /home/john/work/pe_v2_cluster' C-m\; \
send-keys 'source .venv/bin/activate' C-m \; \
new-window -t $session:3 \; \
send-keys 'cd /home/john/work/pe_v2_microservices' C-m\; \
send-keys 'source .venv/bin/activate' C-m \; \
new-window -t $session:4 \; \
send-keys 'cd /home/john/work/pe_v2_aio' C-m\; \
send-keys 'source .venv/bin/activate' C-m \; \
new-window -t $session:5 \; \
send-keys 'cd /home/john/work/pe_v2_rds' C-m\; \
send-keys 'source .venv/bin/activate' C-m \; \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment