tmuxp
tmuxp,tmux 会话管理器。 建立在 libtmux 上。
tmuxp 是一个全新的 tmux 协助工具,它使用 python 对象 来管理 tmux(1)(1) (>= 1.8) 的工作区,极大改善了 tmux 的使用体验。
- 实现了对 冻结活动会话 的基本支持。
- 可以 导入teamocil 和 tmuxinator 。
- 使用JSON或YAML进行 简单 或 更灵活复杂 的配置。
- 支持 bash, zsh 以及 tcsh 。
- 已在tmux(1.8版及git下的最新版)下通过单元测试。详见 travis.yml , Travis CI下自动测试tmuxp 和 测试 。
- 文档, 示例, `内部结构`_ 。
- 了解更多 。
如果您有兴趣,不妨先试看看 快速入门 。
安装
$ pip install --user tmuxp
加载一个 tmux 会话
通过 json 和 YAML,tmuxinator 和 teamocil 样式加载 tmux 会话。
session_name: 4-pane-split windows: - window_name: dev window layout: tiled shell_command_before: - cd ~/ # run as a first command in all panes panes: - shell_command: # pane no. 1 - cd /var/log # run multiple commands in this pane - ls -al | grep \.log - echo second pane # pane no. 2 - echo third pane # pane no. 3 - echo forth pane # pane no. 4
另存为 mysession.yaml,并加载:
$ tmuxp load ./mysession.yaml
~/.tmuxp/ 中的会话可以使用名称:
$ tmuxp load mysession
带有.tmuxp.yaml或.tmuxp.json的项目通过目录加载:
$ tmuxp load path/to/my/project/
一次加载多个(以 bg 表示,最后附上):
$ tmuxp load mysession ./another/project/
简单且详尽的配置示例
将配置存储在(~/.tmuxp)中,或作为 ~/.tmuxp.{yaml,json} 包含在您的项目中。 请参阅 作者的 tmuxp 配置和项目的 tmuxp.yaml。
运行自定义的启动脚本(例如在加载tmux之前安装项目依赖项。请参见 bootstrap_env.py 和 before_script 示例。
您还可以通过传递 -d 标志在后台加载会话
冻结 tmux 会话
快照您的 tmux 布局,pane 路径和 window/session 名称。
$ tmuxp freeze session-name
查看有关 冻结 tmux 会话的更多信息。
文件/阅读材料
请参阅快速入门。
想更多地了解 tmux 本身? 在线阅读 Tmux 之道。
捐献
您的捐款将用于开发新功能,测试和支持。 您的钱将直接用于项目的维护和开发。 如果您是个人,请随时为从项目中获得的价值提供一切合适的感觉。
请参阅 https://git-pull.com/support.html 上的捐赠选项。
项目详情
tmux support | 1.8, 1.9a, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7. 2.8 |
python support | 2.7, >= 3.5, pypy, pypy3 |
config support | yaml, json, python dict |
Source | https://github.com/tmux-python/tmuxp |
Docs | http://tmuxp.git-pull.com |
API | http://tmuxp.git-pull.com/en/latest/api.html |
Changelog | http://tmuxp.git-pull.com/en/latest/history.html |
Issues | https://github.com/tmux-python/tmuxp/issues |
Travis | http://travis-ci.org/tmux-python/tmuxp |
Test Coverage | https://codecov.io/gh/tmux-python/tmuxp |
pypi | https://pypi.python.org/pypi/tmuxp |
Open Hub | https://www.openhub.net/p/tmuxp |
License | MIT. |
git repo | $ git clone https://github.com/tmux-python/tmuxp.git |
install stable | $ pip install --user tmuxp |
install dev | $ git clone https://github.com/tmux-python/tmuxp.git tmuxp
$ cd ./tmuxp
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -e . See the developing and testing page in the docs for more. |
tests | $ make test |