tabby-tmux 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -32
- package/README.zh-CN.md +21 -49
- package/dist/index.js +511 -371
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,9 +32,10 @@ npm install tabby-tmux
|
|
|
32
32
|
|
|
33
33
|
## Usage
|
|
34
34
|
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
35
|
+
1. Open any terminal tab in Tabby
|
|
36
|
+
2. Right-click the tab → **Enter Tmux Mode**
|
|
37
|
+
3. The bottom window bar appears — switch between tmux windows and panes from there
|
|
38
|
+
4. Right-click → **Exit Tmux Mode** to detach
|
|
38
39
|
|
|
39
40
|
### Development
|
|
40
41
|
|
|
@@ -59,35 +60,6 @@ npm install tabby-tmux tabby-trzsz
|
|
|
59
60
|
|
|
60
61
|
> **Note:** When uploading files over WebSocket terminals (e.g. via [tabby-ws-term](https://github.com/ruanimal/tabby-ws-term)), use `trzsz -B 10K` to improve compatibility.
|
|
61
62
|
|
|
62
|
-
## Architecture
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
TmuxService
|
|
66
|
-
├── TmuxGateway — tmux Control Mode protocol parser
|
|
67
|
-
├── TmuxController — session state management & event dispatch
|
|
68
|
-
├── TmuxSessionTab — extends SplitTabComponent, manages window/pane mapping
|
|
69
|
-
├── TmuxWindowBar — collapsible bottom window switcher bar
|
|
70
|
-
└── TmuxPaneTab — extends BaseTerminalTabComponent, single pane
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Data flow
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
User input → TmuxPaneTab → paneSession.feedFromTerminal()
|
|
77
|
-
→ controller.writeToPane(paneId, data)
|
|
78
|
-
→ gateway.sendKeys(hex, paneId) → PTY → tmux
|
|
79
|
-
|
|
80
|
-
tmux output → PTY → controller.handleLine()
|
|
81
|
-
→ gateway.executeLine() → parse protocol
|
|
82
|
-
→ %output → paneSession.emitOutput()
|
|
83
|
-
→ %layout-change → event → SessionTab.syncLayout()
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Tech Stack
|
|
87
|
-
|
|
88
|
-
- **Framework**: Angular 15 + TypeScript 4.9
|
|
89
|
-
- **Dependencies**: `tabby-core`, `tabby-terminal`, `tabby-local`, `rxjs`
|
|
90
|
-
|
|
91
63
|
## License
|
|
92
64
|
|
|
93
65
|
MIT
|
package/README.zh-CN.md
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
# tabby-tmux
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
[English](README.md)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/ruanimal/tabby-tmux/actions/workflows/build.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/tabby-tmux)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[Tabby](https://tabby.sh/) 终端模拟器的 tmux Control Mode 集成插件,灵感来自 [iTerm2 tmux Integration](https://iterm2.com/documentation-tmux-integration.html)。
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## 功能
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
13
|
+
- **原生 UI 集成** — 将 tmux window 和 pane 映射为 Tabby 原生组件
|
|
14
|
+
- **会话持久化** — Tabby 关闭后 tmux 会话保持运行,重新打开时通过 `tmux -CC attach` 恢复
|
|
15
|
+
- **底部窗口栏** — 可折叠的 tmux window 切换栏,支持新建 window、断开连接
|
|
16
|
+
- **布局同步** — 自动同步 tmux layout 到 Tabby SplitTab
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 安装
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### 通过 Tabby 设置界面
|
|
21
21
|
|
|
22
|
-
1.
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
22
|
+
1. 打开 Tabby → **Settings** → **Plugins**
|
|
23
|
+
2. 搜索 `tabby-tmux`
|
|
24
|
+
3. 点击 **Install**
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### 通过命令行
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
cd <tabby-plugins-dir>
|
|
30
30
|
npm install tabby-tmux
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## 使用
|
|
34
34
|
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
35
|
+
1. 在 Tabby 中打开任意终端标签页
|
|
36
|
+
2. 右键点击标签页 → **Enter Tmux Mode**
|
|
37
|
+
3. 底部出现 tmux window 栏,可切换 window 和 pane
|
|
38
|
+
4. 右键 → **Exit Tmux Mode** 退出 tmux 模式
|
|
38
39
|
|
|
39
|
-
###
|
|
40
|
+
### 开发调试
|
|
40
41
|
|
|
41
42
|
```bash
|
|
42
43
|
pnpm install
|
|
43
|
-
pnpm run watch #
|
|
44
|
+
pnpm run watch # 监听模式
|
|
44
45
|
|
|
45
|
-
#
|
|
46
|
+
# 启动 Tabby 并加载插件
|
|
46
47
|
TABBY_PLUGINS=$(pwd) tabby --debug
|
|
47
48
|
```
|
|
48
49
|
|
|
@@ -59,35 +60,6 @@ npm install tabby-tmux tabby-trzsz
|
|
|
59
60
|
|
|
60
61
|
> **提示:** 通过 WebSocket 终端上传文件时(如使用 [tabby-ws-term](https://github.com/ruanimal/tabby-ws-term)),建议使用 `trzsz -B 10K` 以提高兼容性。
|
|
61
62
|
|
|
62
|
-
## Architecture
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
TmuxService
|
|
66
|
-
├── TmuxGateway — tmux Control Mode protocol parser
|
|
67
|
-
├── TmuxController — session state management & event dispatch
|
|
68
|
-
├── TmuxSessionTab — extends SplitTabComponent, manages window/pane mapping
|
|
69
|
-
├── TmuxWindowBar — collapsible bottom window switcher bar
|
|
70
|
-
└── TmuxPaneTab — extends BaseTerminalTabComponent, single pane
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Data flow
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
User input → TmuxPaneTab → paneSession.feedFromTerminal()
|
|
77
|
-
→ controller.writeToPane(paneId, data)
|
|
78
|
-
→ gateway.sendKeys(hex, paneId) → PTY → tmux
|
|
79
|
-
|
|
80
|
-
tmux output → PTY → controller.handleLine()
|
|
81
|
-
→ gateway.executeLine() → parse protocol
|
|
82
|
-
→ %output → paneSession.emitOutput()
|
|
83
|
-
→ %layout-change → event → SessionTab.syncLayout()
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Tech Stack
|
|
87
|
-
|
|
88
|
-
- **Framework**: Angular 15 + TypeScript 4.9
|
|
89
|
-
- **Dependencies**: `tabby-core`, `tabby-terminal`, `tabby-local`, `rxjs`
|
|
90
|
-
|
|
91
63
|
## License
|
|
92
64
|
|
|
93
65
|
MIT
|