Quickstart¶
Installation¶
Assure you have at least tmux >= 1.8 and python >= 3.7.
$ pip install --user tmuxp
You can upgrade to the latest release with:
$ pip install --user --upgrade tmuxp
Then install Completions.
If you are a Homebrew user you can install it with:
$ brew install tmuxp
Developmental releases¶
New versions of tmuxp are published to PyPI as alpha, beta, or release candidates.
In their versions you will see notification like a1
, b1
, and rc1
, respectively.
1.10.0b4
would mean the 4th beta release of 1.10.0
before general availability.
pip:
$ pip install --user --upgrade --pre tmuxp
pipx:
$ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
Then use
tmuxp@next load [session]
.
via trunk (can break easily):
Commands¶
See also
tmuxp launches workspaces / sessions from JSON and YAML files.
Workspace files can be stored in $HOME/.tmuxp
or in project
directories as .tmuxp.py
, .tmuxp.json
or .tmuxp.yaml
.
Every workspace file is required to have:
session_name
list of
windows
list of
panes
for every window inwindows
Create a file, ~/.tmuxp/example.yaml
:
session_name: 2-pane-vertical
windows:
- window_name: my test window
panes:
- echo hello
- echo hello
$ 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 load a workspace and append the windows to
the current active session.
You can also have a custom tmuxp config directory by setting the
TMUXP_CONFIGDIR
in your environment variables.
$ TMUXP_CONFIGDIR=$HOME/.tmuxpmoo tmuxp load cpython
Or in your ~/.bashrc
/ ~/.zshrc
you can set:
export TMUXP_CONFIGDIR=$HOME/.yourconfigdir/tmuxp
You can also Import configs teamocil and tmuxinator.
Pythonics¶
See also
libtmux python API documentation and Developing and Testing.
ORM - Object Relational Mapper
AL - Abstraction Layer
python abstraction layer¶
tmux(1) equivalent |
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|