### Install Teamocil Ruby Gem and Set Up Layout Directory Source: https://github.com/remi/teamocil/blob/master/README.md Provides step-by-step instructions to install the `teamocil` Ruby gem, create the necessary layout directory, edit a sample layout, launch tmux, and run the layout. This sets up the environment for using Teamocil. ```bash # Install the `teamocil` Ruby gem $ gem install teamocil # Create your layout directory $ mkdir ~/.teamocil # Edit ~/.teamocil/sample.yml (look for sample layouts in this very `README.md`) $ teamocil --edit sample # Launch tmux $ tmux # Run your newly-created sample layout $ teamocil sample ``` -------------------------------- ### Define a four-pane tiled window in Teamocil (YAML) Source: https://github.com/remi/teamocil/blob/master/README.md This YAML configuration defines a Teamocil window named `sample-four-panes` with a `tiled` layout. It sets the root directory and specifies four panes, each running a different command: `vim`, `foreman start web`, `git status`, and `foreman start worker`. ```YAML windows: - name: sample-four-panes root: ~/Code/sample/www layout: tiled panes: - vim - foreman start web - git status - foreman start worker ``` -------------------------------- ### Get active tmux window layout string (Bash) Source: https://github.com/remi/teamocil/blob/master/README.md This Bash command retrieves the layout string of the currently active tmux window. This string can then be used as a custom `layout` value in Teamocil configurations, allowing users to preserve manually adjusted pane layouts. ```Bash tmux list-windows -F "#{window_active} #{window_layout}" | grep "^1" | cut -d " " -f 2 ``` -------------------------------- ### Teamocil Command Line Usage Syntax Source: https://github.com/remi/teamocil/blob/master/README.md Shows the basic command-line syntax for running Teamocil, including optional arguments and the layout name. ```bash $ teamocil [options] [layout-name] ``` -------------------------------- ### Teamocil Global Command Line Options Source: https://github.com/remi/teamocil/blob/master/README.md Documents the global command-line options available for Teamocil, detailing their purpose. Currently, only `--list` is described, which lists all available layouts. ```APIDOC Option: --list Description: Lists all available layouts in ~/.teamocil ``` -------------------------------- ### Configure a two-pane window with focus (YAML) Source: https://github.com/remi/teamocil/blob/master/README.md This YAML configuration creates a Teamocil window named `sample-two-panes` with an `even-horizontal` layout. It defines two panes, where the second pane is explicitly set to receive focus upon creation and runs `rails console`. ```YAML windows: - name: sample-two-panes root: ~/Code/sample/www layout: even-horizontal panes: - rails server - commands: - rails console focus: true ``` -------------------------------- ### Teamocil Window Configuration Keys Source: https://github.com/remi/teamocil/blob/master/README.md Defines the configuration keys for a Teamocil window within a YAML layout file. It specifies properties like `name` (required), `root` path, `layout` type, `panes` array, `focus` setting, and `options` hash for `set-window-option`. ```APIDOC Key: name Description: The tmux window name (required) Key: root Description: The path where all panes in the window will be started Key: layout Description: The layout that will be set after all panes are created by Teamocil Key: panes Description: An Array of panes Key: focus Description: If set to true, the window will be selected after the layout has been executed Key: options Description: A Hash of options that will be set with the set-window-option command ``` -------------------------------- ### Teamocil Pane Configuration Keys Source: https://github.com/remi/teamocil/blob/master/README.md Defines the configuration keys for a Teamocil pane within a YAML layout file. A pane can be a simple string (single command) or a hash with `commands` (array of commands) and `focus` setting. ```APIDOC Key: commands Description: An Array of commands that will be ran when the pane is created Key: focus Description: If set to true, the pane will be selected after the layout has been executed ``` -------------------------------- ### Teamocil Session Configuration Keys Source: https://github.com/remi/teamocil/blob/master/README.md Defines the configuration keys for a Teamocil session within a YAML layout file. It includes `name` for the tmux session name and `windows` as an array of window configurations. ```APIDOC Key: name Description: The tmux session name Key: windows Description: An Array of windows ``` -------------------------------- ### Teamocil Layout-Specific Command Line Options Source: https://github.com/remi/teamocil/blob/master/README.md Documents command-line options specific to managing Teamocil layouts. These options allow specifying custom layout files, using the current window, editing layouts, or showing layout content instead of executing. ```APIDOC Option: --layout Description: Takes a custom file path to a YAML layout file instead of [layout-name] Option: --here Description: Uses the current window as the layout’s first window Option: --edit Description: Opens the layout file with $EDITOR instead of executing it Option: --show Description: Shows the layout content instead of executing it ``` -------------------------------- ### Teamocil YAML Layout for Three Vertical Panes Source: https://github.com/remi/teamocil/blob/master/README.md Demonstrates a Teamocil YAML configuration for a tmux window with three panes arranged vertically. It defines a window name, root directory, a `main-vertical` layout, and three panes, one of which contains multiple commands. ```yaml windows: - name: sample-three-panes root: ~/Code/sample/www layout: main-vertical panes: - vim - commands: - git pull - git status - rails server ``` -------------------------------- ### Teamocil YAML Layout for Two Horizontal Panes Source: https://github.com/remi/teamocil/blob/master/README.md Illustrates a basic Teamocil YAML configuration for a tmux window with two horizontally split panes. The layout specifies a window name, a root directory, a `even-horizontal` layout, and two commands for the panes: `git status` and `rails server`. ```yaml windows: - name: sample-two-panes root: ~/Code/sample/www layout: even-horizontal panes: - git status - rails server ``` -------------------------------- ### Define Teamocil window with custom tmux layout (YAML) Source: https://github.com/remi/teamocil/blob/master/README.md This YAML configuration demonstrates how to use a custom tmux layout string for a Teamocil window. The `layout` key is set to a specific tmux layout identifier, allowing for precise control over pane dimensions and positions beyond standard layouts. ```YAML windows: - name: sample-two-uneven-panes layout: 00c7,158x38,0,0[158x9,0,0,37,158x28,0,10,39] panes: - echo foo - echo bar ``` -------------------------------- ### Enable Teamocil autocompletion in Zsh Source: https://github.com/remi/teamocil/blob/master/README.md This Zsh command adds autocompletion for `teamocil` commands. It uses `compctl` to complete `teamocil` arguments based on files found in `~/.teamocil/` directories, allowing for easy selection of session configurations. Add this line to your `~/.zshrc` file. ```Zsh compctl -g '~/.teamocil/*(:t:r)' teamocil ``` -------------------------------- ### Enable Teamocil autocompletion in Fish shell Source: https://github.com/remi/teamocil/blob/master/README.md This Fish shell command provides autocompletion for `teamocil` commands. It defines a completion rule that uses the output of `teamocil --list` to suggest available session names. This snippet should be saved in `~/.config/fish/completions/teamocil.fish`. ```Fish complete -x -c teamocil -a '(teamocil --list)' ``` -------------------------------- ### Enable Teamocil autocompletion in Bash Source: https://github.com/remi/teamocil/blob/master/README.md This Bash command enables autocompletion for `teamocil` by dynamically generating a list of possible completions using `teamocil --list`. Add this line to your `~/.bashrc` file to have `teamocil` session names autocompleted. ```Bash complete -W "$(teamocil --list)" teamocil ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.