Note

tmuxp is usable but still needs your help reporting errors, bugs and usability feedback. If you encounter an error, please post on the Issue tracker.

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

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.

Pythonics

ORM - Object Relational Mapper

AL - Abstraction Layer

python abstraction layer

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

tmux ORM

tmuxp’s core internal feature is the object relation and orchestration of the tmux server (think an engine in SQLAlchemy) and the server’s sessions, so on...

instances of tmux objects use tmux 1.8‘s pane_id, window_id and session_id to build create python objects to build workspaces with the freshest data.