64 lines
1.9 KiB
Markdown
64 lines
1.9 KiB
Markdown
## Introduction
|
||
|
||
Teamocil is a tool used to automatically create sessions, windows and splits in `tmux` with Ruby and YAML. Like [tmuxinator](https://github.com/aziz/tmuxinator), but with splits, not just windows.
|
||
|
||
## Usage
|
||
|
||
$ gem install teamocil
|
||
$ mkdir ~/.teamocil
|
||
$ touch ~/.teamocil/sample.yml
|
||
$ tmux
|
||
$ teamocil sample
|
||
|
||
## Options
|
||
|
||
* `--here` opens the session from the current window, it doesn’t create an empty first window.
|
||
* `--layout` takes a custom file path to a YAML layout file.
|
||
* `--edit` opens the layout file (whether or not `--layout` is used) with `$EDITOR`.
|
||
|
||
## Layout example
|
||
|
||
# ~/.teamocil/sample.yml
|
||
|
||
session:
|
||
name: sample-session
|
||
windows:
|
||
- name: sample-window
|
||
root: ~/Code/sample/www
|
||
splits:
|
||
- cmd:
|
||
- ls -la
|
||
- git status
|
||
- cmd: rails server --port 3000
|
||
width: 50
|
||
- cmd: memcached -p 11211 -vv
|
||
height: 25
|
||
|
||
Running `$ teamocil sample` will rename the session to `sample-session` and create a new window named `sample-window` with a layout like this:
|
||
|
||
.------------------.------------------.
|
||
| (0) | (1) |
|
||
| | |
|
||
| | |
|
||
| | |
|
||
| | |
|
||
| | |
|
||
| |------------------|
|
||
| | (2) |
|
||
| | |
|
||
'------------------'------------------'
|
||
|
||
## Extras
|
||
|
||
### Zsh autocompletion
|
||
|
||
To get autocompletion when typing `teamocil <Tab>` in a zsh session, add this line to your `~/.zshrc` file:
|
||
|
||
compctl -g '~/.teamocil/*(:t:r)' teamocil
|
||
|
||
## Contributors
|
||
|
||
Feel free to contribute and submit pull requests!
|
||
|
||
* Samuel Garneau ([garno](https://github.com/garno))
|