Skip to content

Instantly share code, notes, and snippets.

@jgeewax
Created March 22, 2013 02:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgeewax/5218567 to your computer and use it in GitHub Desktop.
Save jgeewax/5218567 to your computer and use it in GitHub Desktop.
# The session name should have been passed in, but if not
# default to 'default-session-name'
session=${1-"default-session-name"}
# Create and name some windows.
tmux rename-window -t $session:1 bash
tmux new-window -t $session:2 -n webserver
tmux new-window -t $session:3 -n python
tmux new-window -t $session:4 -n templates
tmux new-window -t $session:5 -n js
tmux new-window -t $session:6 -n less
# Configure the various windows.
tmux send-keys -t $session:2 "make serve" C-m
tmux send-keys -t $session:4 "cd templates && clear" C-m
tmux send-keys -t $session:5 "cd media/ && clear" C-m
tmux send-keys -t $session:6 "cd media/less/ && clear" C-m
# Attach to the first window.
tmux select-window -t $session:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment