All Projects → remi → Teamocil

remi / Teamocil

Licence: mit
There's no I in Teamocil. At least not where you think. Teamocil is a simple tool used to automatically create windows and panes in tmux with YAML files.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Teamocil

Vim Tidal
Vim plugin for TidalCycles
Stars: ✭ 147 (-93.25%)
Mutual labels:  tmux
Sendcode
Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
Stars: ✭ 166 (-92.38%)
Mutual labels:  tmux
Dotfiles
🔩 Dotfiles for bash, zsh, tmux, emacs, vim, etc
Stars: ✭ 175 (-91.97%)
Mutual labels:  tmux
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (-93.16%)
Mutual labels:  tmux
Vimux
easily interact with tmux from vim
Stars: ✭ 1,980 (-9.13%)
Mutual labels:  tmux
Tmux Gitbar
Git in your tmux status bar
Stars: ✭ 167 (-92.34%)
Mutual labels:  tmux
Xkbswitch Macosx
Console keyboard layout switcher for MacOS
Stars: ✭ 144 (-93.39%)
Mutual labels:  tmux
Fast Ide
🕺Fast Integrated Development Environment 😻
Stars: ✭ 181 (-91.69%)
Mutual labels:  tmux
Eternalterminal
Re-Connectable secure remote shell
Stars: ✭ 2,191 (+0.55%)
Mutual labels:  tmux
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+496.1%)
Mutual labels:  tmux
Axiom
The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
Stars: ✭ 2,424 (+11.24%)
Mutual labels:  tmux
Tmux Bash Completion
Tmux bash completion
Stars: ✭ 153 (-92.98%)
Mutual labels:  tmux
.dotfiles
🎆 Arch Linux with i3 / nvim / tmux / urxvt / zsh / ...
Stars: ✭ 167 (-92.34%)
Mutual labels:  tmux
Dotfiles
Dotfiles (macOS, stow, brew, yabai, nvim, kitty, tmux)
Stars: ✭ 146 (-93.3%)
Mutual labels:  tmux
Neovim Config
Neovim configuration
Stars: ✭ 180 (-91.74%)
Mutual labels:  tmux
Tmux Yank
Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
Stars: ✭ 1,941 (-10.92%)
Mutual labels:  tmux
Tmux 1password
🔑 Access your 1Password login items within tmux!
Stars: ✭ 167 (-92.34%)
Mutual labels:  tmux
Gitmux
💻 Git in your tmux status bar
Stars: ✭ 180 (-91.74%)
Mutual labels:  tmux
Dotfiles
My [NeoVim + Tmux + Fish Shell] Setup /w install scripts
Stars: ✭ 180 (-91.74%)
Mutual labels:  tmux
Dotfiles
vim, zsh, git, homebrew, nvm, neovim - my whole world
Stars: ✭ 2,217 (+1.74%)
Mutual labels:  tmux

Teamocil
Teamocil is a simple tool used to automatically create
windows and panes in tmux with YAML files.


Installation

# 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

Usage

$ teamocil [options] [layout-name]

Global options

Option Description
--list Lists all available layouts in ~/.teamocil

Layout options

Option Description
--layout Takes a custom file path to a YAML layout file instead of [layout-name]
--here Uses the current window as the layout’s first window
--edit Opens the layout file with $EDITOR instead of executing it
--show Shows the layout content instead of executing it

Upgrading

Teamocil 1.0 is a complete rewrite (from scratch!) of Teamocil. The code is now very much simpler, cleaner and easier to maintain.

The downside of that is that several features were dropped during the rewrite process, mostly because I didn’t actually use/need them and I got tired of maintaining features I don’t think are useful.

You might have to clean up your layout files after upgrading to 1.0. I’m sorry about that. The documentation in README.md should help you find which keys are now supported.

The 0.4-stable branch is still available with the old code. Feel free to fork the repository and add back as many features as you want :)

Configuration

Session

Key Description
name The tmux session name
windows An Array of windows

Windows

Key Description
name The tmux window name (required)
root The path where all panes in the window will be started
layout The layout that will be set after all panes are created by Teamocil
panes An Array of panes
focus If set to true, the window will be selected after the layout has been executed
options A Hash of options that will be set with the set-window-option command

Panes

A pane can either be a String or a Hash. If it’s a String, Teamocil will treat it as a single-command pane.

Key Description
commands An Array of commands that will be ran when the pane is created
focus If set to true, the pane will be selected after the layout has been executed

Examples

Simple two pane window

windows:
  - name: sample-two-panes
    root: ~/Code/sample/www
    layout: even-horizontal
    panes:
      - git status
      - rails server
.------------------.------------------.
| (0)              | (1)              |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
'------------------'------------------'

Simple three pane window

windows:
  - name: sample-three-panes
    root: ~/Code/sample/www
    layout: main-vertical
    panes:
      - vim
      - commands:
        - git pull
        - git status
      - rails server
.------------------.------------------.
| (0)              | (1)              |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |------------------|
|                  | (2)              |
|                  |                  |
|                  |                  |
|                  |                  |
'------------------'------------------'

Simple four pane window

windows:
  - name: sample-four-panes
    root: ~/Code/sample/www
    layout: tiled
    panes:
      - vim
      - foreman start web
      - git status
      - foreman start worker
.------------------.------------------.
| (0)              | (1)              |
|                  |                  |
|                  |                  |
|                  |                  |
|------------------|------------------|
| (2)              | (3)              |
|                  |                  |
|                  |                  |
|                  |                  |
'------------------'------------------'

Two pane window with focus in second pane

windows:
  - name: sample-two-panes
    root: ~/Code/sample/www
    layout: even-horizontal
    panes:
      - rails server
      - commands:
          - rails console
        focus: true
.------------------.------------------.
| (0)              | (1) <focus here> |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
|                  |                  |
'------------------'------------------'

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

zsh-completions also provides additional completion definitions for Teamocil.

Bash autocompletion

To get autocompletion when typing teamocil <Tab> in a bash session, add this line to your ~/.bashrc file:

complete -W "$(teamocil --list)" teamocil

Fish autocompletion

To get autocompletion when typing teamocil <Tab> in a fish session, add the following file ~/.config/fish/completions/teamocil.fish with the following content:

complete -x -c teamocil -a '(teamocil --list)'

Custom window layout

Teamocil supports all the window layout names supported by tmux.

  • even-horizontal
  • even-vertical
  • main-horizontal
  • main-vertical
  • tiled

However, it also supports the custom format understood by tmux. This is especially useful if you want to manually resize your panes and keep using that layout in the future.

You can grab the layout for the current window by running this command:

tmux list-windows -F "#{window_active} #{window_layout}" | grep "^1" | cut -d " " -f 2

You can then use the result as the layout key for any Teamocil window object.

windows:
  - name: sample-two-uneven-panes
    layout: 00c7,158x38,0,0[158x9,0,0,37,158x28,0,10,39]
    panes:
      - echo foo
      - echo bar

Contributors

Feel free to contribute and submit issues/pull requests on GitHub, just like these fine folks did:

License

Teamocil is © 2011-2016 Rémi Prévost and may be freely distributed under the MIT license. See the LICENSE.md file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].