kenn/termup — pull request #1 by berk (2012-12-06 01:29:26+00:00)
Title: Extension for comprehensive iTerm2 layouts

Kenn,
i love iTerm2 and your gem. But i wanted to have a more flexible layout mechanism and here is what i've done:

The layout of the yml config file changed a little:

tabs:
- tab1:
commands:
- echo tab1
layout:
- split_vertically
- tab2:
commands:
- echo tab2
layout:
- split_horizontally
- tab3:
commands:
- echo tab3
layout:
- split_horizontally
- tab4:
foreground: yellow
background: blue
transparency: 0.1
commands:
- echo tab4

options:
iterm2: true

You now can set foreground, background and transparency of every tab. You can also execute layout commands after each tab's commands. For example, if you just want to build a simple 2 by 2. It would be something like this:

tabs:
- tab1:
commands:
- echo tab1
layout:
- split_horizontally
- tab2:
commands:
- echo tab2
layout:
- split_vertically
- tab3:
commands:
- echo tab3
layout:
- go_up
- split_vertically
- tab4:
commands:
- echo tab4

options:
iterm2: true

You would create this file by running:

termup create four_squares --iterm2

--iterm2 is a param that indicates that iterm2.yml layout should be used instead of your default template.

Try it out, let me know what you think.

Michael.