Skip to content

Instantly share code, notes, and snippets.

@Lytol
Created December 3, 2014 01:52
Show Gist options
  • Save Lytol/32227b5854be41f4377e to your computer and use it in GitHub Desktop.
Save Lytol/32227b5854be41f4377e to your computer and use it in GitHub Desktop.
#!/bin/bash
SESSION=`basename $PWD`
tmux new-session -d -s $SESSION -n 'Shell'
tmux split-window -h
if [[ -e Procfile ]]; then
tmux new-window -t $SESSION:1 -n 'Foreman'
tmux select-window -t $SESSION:1
tmux send-keys "foreman start" C-m
fi
tmux new-window -t $SESSION:2 -n 'Vim'
tmux select-window -t $SESSION:2
tmux send-keys "vim" C-m
tmux select-window -t $SESSION:0
tmux attach-session -t $SESSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment