Quickstart

Installation

Assure you have at least tmux >= 1.8 and python >= 2.6. For Ubuntu 12.04/12.10/13.04 users, you can download the tmux 1.8 package for Ubuntu 13.10 from https://launchpad.net/ubuntu/+source/tmux and install it using dpkg.

$ pip install tmuxp

You can upgrade to the latest release with:

$ pip install tmuxp -U

Then install bash_completion.

CLI

See also

Examples, Command Line Interface, bash_completion.

tmuxp launches workspaces / sessions from JSON and YAML files.

Configuration files can be stored in $HOME/.tmuxp or in project directories as .tmuxp.py, .tmuxp.json or .tmuxp.yaml.

Every configuration is required to have:

  1. session_name
  2. list of windows
  3. list of panes for every window in windows

Create a file, ~/.tmuxp/example.yaml:

session_name: 2-pane-vertical
windows:
  - window_name: my test window
    panes:
      - pwd
      - pwd
$ tmuxp load example.yaml

This creates your tmuxp session.

Load multiple tmux sessions at once:

$ tmuxp load example.yaml anothersession.yaml

tmuxp will offer to switch-client for you if you’re already in a session.

You can also Import configs teamocil and tmuxinator.

Pythonics

ORM - Object Relational Mapper

AL - Abstraction Layer

python abstraction layer

tmuxp python api tmux(1) equivalent
libtmux.Server.new_session() $ tmux new-session
libtmux.Server.list_sessions() $ tmux list-sessions
libtmux.Session.list_windows() $ tmux list-windows
libtmux.Session.new_window() $ tmux new-window
libtmux.Window.list_panes() $ tmux list-panes
libtmux.Window.split_window() $ tmux split-window
libtmux.Pane.send_keys() $ tmux send-keys