Skip to content

Instantly share code, notes, and snippets.

@jkonecny12
Created March 9, 2016 07:38
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 jkonecny12/c01f4cd895edfe64bbd9 to your computer and use it in GitHub Desktop.
Save jkonecny12/c01f4cd895edfe64bbd9 to your computer and use it in GitHub Desktop.
Create or attach session on tmux
#!/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