Created
March 9, 2016 07:38
-
-
Save jkonecny12/c01f4cd895edfe64bbd9 to your computer and use it in GitHub Desktop.
Create or attach session on tmux
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 | |
sleep 1 | |
SESSION=tmux | |
tmux has-session -t $SESSION | |
if [ $? -eq 1 ]; then | |
tmux new-session -d -c ~/RH/projects/ -n "projects" -s $SESSION | |
tmux neww -c ~/RH/scripts/vm_scripts/ -n "scripts" -t $SESSION | |
tmux neww -c ~/RH/kickstart -n "kickstart" -t $SESSION | |
tmux neww -t $SESSION | |
#tmux neww -t $SESSION | |
sleep 0.5 | |
tmux select-window -p -t $SESSION | |
tmux select-window -p -t $SESSION | |
tmux select-window -p -t $SESSION | |
fi | |
tmux attach-session -t $SESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment