Merge branch 'garno'

This commit is contained in:
Rémi Prévost 2011-07-19 08:39:42 -04:00
commit 8df40e6ee3
2 changed files with 20 additions and 11 deletions

View File

@ -14,16 +14,18 @@ Teamocil is a tool used to automatically create windows and splits in `tmux` wit
# ~/.teamocil/sample.yml # ~/.teamocil/sample.yml
windows: session:
- name: sample-window name: sample-session
splits: windows:
- cmd: cd ~/Code/sample/www - name: sample-window
- cmd: splits:
- cd ~/Code/sample/www - cmd: cd ~/Code/sample/www
- rails s - cmd:
width: 50 - cd ~/Code/sample/www
- cmd: memcached -p 11211 -vv - rails s
height: 25 width: 50
- cmd: memcached -p 11211 -vv
height: 25
will create a new window named `sample-window` with a layout like this: will create a new window named `sample-window` with a layout like this:

View File

@ -16,7 +16,14 @@ module Teamocil
def generate_commands # {{{ def generate_commands # {{{
output = [] output = []
@layout["windows"].each_with_index do |window, window_index| if @layout["session"].nil?
windows = @layout["windows"]
else
output << "tmux rename-session #{@layout["session"]["name"]}"
windows = @layout["session"]["windows"]
end
windows.each_with_index do |window, window_index|
if options.include?(:here) and window_index == 0 if options.include?(:here) and window_index == 0
output << "tmux rename-window #{window["name"]}" output << "tmux rename-window #{window["name"]}"