Last active
February 11, 2018 09:50
-
-
Save rubenmoya/209fe78686c8241ad73ac2bb6c87732d to your computer and use it in GitHub Desktop.
tmux script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set a variable with the session name | |
SESSION=wadus | |
# Create our new session, detached so that the rest of the script can run | |
tmux new-session -d -s $SESSION | |
# Rename first window to frontend | |
tmux rename-window -t $SESSION:0 'frontend' | |
# Start editor | |
tmux send-keys 'vim ./wadus-client' C-m | |
# Split horizontal | |
tmux split-window -h | |
# Start project | |
tmux send-keys 'cd ./wadus-client; yarn start' C-m | |
# Create a new window named backend | |
tmux new-window -t $SESSION:1 -n 'backend' | |
# Select firs window | |
tmux select-window -t $SESSION:1 | |
# Start editor | |
tmux send-keys 'vim ./wadus-server' C-m | |
# Split horizontal | |
tmux split-window -h | |
# Start project | |
tmux send-keys 'cd ./wadus-server; yarn start' C-m | |
# Attach to the session | |
tmux attach -t $SESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment