注解
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)¶
命令行(CLI)¶
tmuxp根据配置文件启动会话(session)。
配置文件保存在``$HOME/.tmuxp`` 或是 .tmuxp.py , .tmuxp.json , .tmuxp.yaml 项目目录下。
配置文件必须包括下列内容:
- session_name
- windows 列表
- 每个 windows 所包含的``panes`` 列表
创建一个 ~/.tmuxp/example.yaml 文件:
session_name: 2-pane-vertical
windows:
- window_name: my test window
panes:
- pwd
- pwd
运行tmuxp:
$ tmuxp load -l
列出当前目录以及 $HOME/.tmuxp 下可用的配置项,然后tmuxp会检测到 example.yaml 文件的存在
$ tmuxp load example.yaml
创建你的tmuxp会话(session)。
Pythonics¶
ORM - 对象关系映射(Object Relational Mapping)
python抽象层¶
tmuxp python api | tmux(1) 指令 |
---|---|
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 |