Skip to content

Instantly share code, notes, and snippets.

@vicramon
Last active January 4, 2016 15:39
Show Gist options
  • Save vicramon/8642438 to your computer and use it in GitHub Desktop.
Save vicramon/8642438 to your computer and use it in GitHub Desktop.
Initialize tmux with rails console and server
# ~/hashrocket/hr/share/mux-init
tmux \
split-window -h -t $name \; \
split-window -d -h -t $name \; \
select-layout -t $name main-horizontal &>/dev/null \; \
new-window -a -d -n server -t $name:0 \; \
split-window -d -h -t $name:server \; \
send-keys -t $name:0.2 'vim .' C-m \; \
send-keys -t $name:1.1 'rails s' C-m \; \
send-keys -t $name:1.0 'rails c' C-m \;
@jonallured
Copy link

Rather than replacing the ~/hashrocket/hr/share/mux-init file, you could just put this at ~/.mux and it'll be picked up that way. I do that on my laptop because I don't like vertical splits with such a small screen. Here's mine:

https://github.com/jonallured/dotfiles/blob/master/files/mux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment