The `iterm-window` executable will open and run an `iTermfile` file in the current directory.
An `iTermfile` file looks like this:
``` ruby
open :dir => Dir.pwd do
default_tab :console
open_tab :rails, :color => :rails do
guard "-g rails"
end
open_tab :rspec, :color => :rspec do
guard "-g rspec"
end
open_tab :log, :color => "DDB" do
tail "+F -fr log/sphinx.log"
end
end
```
In a nutshell:
*`open` blocks open new iTerm windows.
*`current` blocks use the cirrent iTerm window.
* Inside `open` or `current` blocks you can open a new tab with `open_tab`.
* Specify a tab to be the selected tab with `default_tab`.
* Inside of a tab, you can write text into the terminal with `write_text`.
* Set the title of the tab with `set_title`.
* Or run a command magically (using `method_missing`).
`open_tab`, and `default_tab` can take an options hash:
*`:dir` changes to the given directory before executing commands.
*`:color` changes the window chrome and tab color to the given hex code (3 or 6 hex digits) or built-in color. See ItermWindow.colors for the list of available colors.