Skip to main content

Manage and build tmux workspaces.

Project description

tmuxp solves the panes / pains of managing workspaces.

https://travis-ci.org/tony/tmuxp.png?branch=master https://badge.fury.io/py/tmuxp.png
https://raw.github.com/tony/tmuxp/master/doc/_static/tmuxp-dev-screenshot.png

Open to testers

tmuxp is still alpha code and needs a few more weeks until stable. See the Issues tracker to see known issues and for any other concerns.

tmuxp, a novel approach to managing tmux(1) workspaces through python objects. Features:

  • Load + switch to new session from inside tmux.

  • bash / zsh / tcsh completion

  • JSON, YAML and python dict configuration.

  • Support for pre-commands with shell_command_before to load virtualenv / rvm / any other commands.

  • Session resuming from config file if already running.

  • Per-project tmux sessions

  • uses tmux 1.8’s pane_id, window_id and session_id to build create python objects to build workspaces with the freshest data.

tmuxp works in 3 ways:

  • a pythonic abstraction layer on top of tmux’ CLI commands

  • an ORM that internally orchestrates relations between servers, sessions, windows and panes for good and evil purposes.

  • CLI tmux session manager, similar to teamocil and tmuxinator, with support for YAML, JSON and python dicts.

Get started

Get the prerequisites:

  1. installed tmux, at least version 1.8

  2. libyaml is installed for your distribution.

Install tmuxp:

$ pip install tmuxp

$ mkdir ~/.tmuxp and make a file ~/.tmuxp/test.yaml.

session_name: my session
windows:
- window_name: my test window
  panes:
  - pwd
  - pwd

Now with tmuxp:

$ tmuxp test.yaml

Check out our Examples, Quickstart and bash completion support.

Advanced tmux workflow:

session_name: tmuxp
windows:
- window_name: tmuxp
  layout: main-horizontal
  options:
    main-pane-height: 50
  start_directory: ./
  shell_command_before:
    - '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate || virtualenv .env'
  panes:
  - shell_command:
    - vim
    - :Ex
    focus: true
  - shell_command:
    - echo hi
  - shell_command:
    - '[ -d .env -a -f .env/bin/activate ] || virtualenv .env'
    - command -v tmuxp >/dev/null 2>&1 || { pip install -e .; }
    - command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
    - watching_testrunner --basepath ./ --pattern="*.py" python run_tests.py
- window_name: docs
  layout: main-horizontal
  options:
    main-pane-height: 50
  start_directory: ./
  automatic_rename: true
  shell_command_before:
    - '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate || virtualenv .env'
    - command -v tmuxp >/dev/null 2>&1 || { pip install -e .; }
    - cd ./doc
  panes:
  - shell_command:
    - vim
    focus: true
  - pwd
  - echo 'docs built to <http://0.0.0.0:8000/_build/html>'; python -m SimpleHTTPServer
  - shell_command:
    - command -v sphinx-quickstart >/dev/null 2>&1 || { pip install -r requirements.pip; }
    - command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
    - watching_testrunner --basepath ./ --pattern="*.rst" 'make html'

see this in the Developing and Testing documentation page.

tmux support

1.8, 1.9-dev

config support

yaml, json, python dict

Travis

http://travis-ci.org/tony/tmuxp

Docs

http://tmuxp.rtfd.org

API

http://tmuxp.readthedocs.org/en/latest/api.html

Changelog

http://tmuxp.readthedocs.org/en/latest/changes.html

Issues

https://github.com/tony/tmuxp/issues

Source

https://github.com/tony/tmuxp

pypi

https://pypi-hypernode.com/pypi/tmuxp

License

BSD.

git repo

$ git clone https://github.com/tony/tmuxp.git

install dev

$ git clone https://github.com/tony/tmuxp.git tmuxp
$ cd ./tmuxp
$ virtualenv .env
$ source .env/bin/activate
$ pip install -e .

See the developing and testing page in the docs for more.

tests

$ python ./run_tests.py

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmuxp-0.0.8-dev.tar.gz (46.8 kB view details)

Uploaded Source

File details

Details for the file tmuxp-0.0.8-dev.tar.gz.

File metadata

  • Download URL: tmuxp-0.0.8-dev.tar.gz
  • Upload date:
  • Size: 46.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tmuxp-0.0.8-dev.tar.gz
Algorithm Hash digest
SHA256 9597489668abc16baf4af63c848942c005aa8d796eb4d26620252c299efd2558
MD5 d3f712ad6f04e5b2a0d05d1ee8a28e00
BLAKE2b-256 0c6b7b74a5c07b0bc303602feddf0b5104a05244eead607446a9439bb0e3694e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page