Created
August 17, 2017 15:13
-
-
Save ammar/aa9fcae876477ca0f31d5208b756cca0 to your computer and use it in GitHub Desktop.
Tmux script to setup a tmate session (a rails app directory tree in this case)
This file contains hidden or 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
#!/bin/bash | |
tmux_session=pair | |
tmux rename-session 'pair' | |
tmux rename-window 'shell' | |
tmux send-keys -t $session_name:1 'source .env' Enter | |
tmux new-window -t $tmux_session:2 -n 'root' | |
tmux send-keys -t $session_name:1 'source .env' Enter | |
cd ./app | |
tmux new-window -t $tmux_session:3 -n 'app' | |
cd ./views | |
tmux new-window -t $tmux_session:4 -n 'views' | |
cd ./../assets/stylesheets | |
tmux new-window -t $tmux_session:5 -n 'css' | |
cd ./../javascripts/ | |
tmux new-window -t $tmux_session:6 -n 'js' | |
cd ./../../../log | |
tmux new-window -t $tmux_session:7 -n 'log' | |
cd ./../lib/tasks | |
tmux new-window -t $tmux_session:8 -n 'tasks' | |
cd ./../../ | |
tmux new-window -t $tmux_session:9 -n 'console' | |
tmux select-window -t $tmux_session:2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment