3去掉跨主机分屏 · 新建分屏交互 · 会话标题 · 首页与关闭/最小化
跨主机分屏已移除
分屏只发生在同一台主机内,层级回到「主机 → 会话 → window → pane」四层。要同时看两台机器,用轨道或侧边栏一键切换。第 2 轮的 2b 稿已作废删除。
新建分屏
不问方向(竖分/横分本就是两个按钮),只列这台主机的 tmux 会话,末尾追加「原生窗口」,选完立即分屏。见 3b
tmux 会话标题
会话行第二行显示当前 window title,window 行显示各自 title(仍是默认 zsh 时退回 cwd),不新增层级。见 3a
首页入口
默认遮罩态:288pt 面板盖住轨道(非并排,故无两套入口),点终端即收起;点 Pin 才钉在左侧、终端变窄。栏内仍是上「活动会话」下「TMUX」两段。见 3a
关闭 / 最小化
沿用 macOS 红黄圆点:黄点最小化不确认,红点关闭才确认;tmux 默认仅断开,原生窗口明说进程会结束。见 3c
对你方案的两点修改
① 最小化后落地页卡片置顶并标「最小化中」,配缩回动画,否则用户不知道东西去哪了;② 关闭的确认按主机能力分成两套文案,tmux 不默认 kill(只有次要按钮才是 kill)。见 3d
3a侧边栏:遮罩态与 Pin 态 折叠与展开只是同一条栏的两个状态,元素不增不减:折叠 56pt 收成图标(搜索 / 首页 / 主机 / TMUX / 设置 / 展开键),展开 288pt 显示完整标题。左上角 是 App logo,不可点;开合只有一枚按钮——折叠态是轨道底部的 »,展开态是标题右侧的 «,方向相反不歧义。左=默认遮罩态:288pt 面板盖住 56pt 轨道(不是并排,因此没有两套入口),右侧压一层遮罩,点终端任意处即收起。右=点 Pin 之后:面板钉在左侧、遮罩消失、终端变窄并只 resize 一次;再点一次 Pin 回到遮罩态。栏内布局沿用轨道的分区:上半「活动会话」,下半「TMUX(当前主机的 window 列表)」。
ms
u2
nh
TMUX
0
1
2
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
backoff caps at 30s
mosh three-phase resume
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) git status --short
M apps/TerminalX/iOS/RailSidebar.swift
?? docs/ui/sidebar-states.md
 
terminalx git:(main) git fetch --all --prune
 
terminalx git:(main)
0.1 · 日志 · log stream --style compact168×17
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:03:12 terminalx: ghostty frame 16.7ms
tsnet
mosh41ms
tmuxdev
mac-studio 运行测试 · ~/src/terminalx
遮罩态 · 点终端任意处收起⌘\ 收起Pin 钉在左侧⌘⇧H 回首页 切换会话
terminalX
搜索主机 · 会话
首页⌘⇧H
活动会话3
ms
mac-studio · dev
运行测试 · 3 windows
41ms
u2
ubuntu-cn2 · build
集成测试 · 1 window
186ms
nh
nas-home
原生窗口 · ~
重连中
连接新主机…
TMUX · mac-studio · dev
0
运行测试
~/src/terminalx · 2 panes
1
日志
~/src/terminalx
2
nvim Theme.swift
packages/TXCore
新建 window ⌘T
Tailscale 已连接
ipad-pro · 100.92.14.7
terminalX
搜索主机 · 会话
首页⌘⇧H
活动会话3
ms
mac-studio · dev
运行测试 · 3 windows
41ms
u2
ubuntu-cn2 · build
集成测试 · 1 window
186ms
nh
nas-home
原生窗口 · ~
重连中
连接新主机…
TMUX · mac-studio · dev
0
运行测试
~/src/terminalx · 2 panes
1
日志
~/src/terminalx
2
nvim Theme.swift
packages/TXCore
新建 window ⌘T
Tailscale 已连接
ipad-pro · 100.92.14.7
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
backoff caps at 30s
mosh three-phase resume
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) git status --short
M apps/TerminalX/iOS/RailSidebar.swift
?? docs/ui/sidebar-states.md
 
terminalx git:(main) git fetch --all --prune
 
terminalx git:(main)
0.1 · 日志 · log stream --style compact132×17
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:03:12 terminalx: ghostty frame 16.7ms
tsnet
mosh41ms
tmuxdev
mac-studio 运行测试 · ~/src/terminalx
Pin 态 · 终端变窄,仅在钉住/解除时各 resize 一次Pin 解除钉住⌘\ 收起为轨道⌘⇧H 回首页
3b新建分屏:只问"分到哪个会话" 竖分 / 横分本来就是两个不同的按钮(⌘D / ⌘⇧D,触控是轨道 + 的两枚小图标),所以菜单不再问方向。菜单只列出这台主机上的 tmux 会话(含当前会话、可接管的 detached 会话、新建会话),最后追加一项原生窗口。选完立即分屏——此稿右侧就是选中「dev(当前会话)」后竖分的结果。
ms
u2
nh
TMUX
0
1
2
terminalx git:(main) swift package resolve
Fetching TXCore … resolved
Fetching swift-log 1.6.1 … resolved
 
terminalx git:(main) xcodebuild -showsdks | head -2
iOS SDKs: iOS 26.2 (iphoneos26.2)
macOS SDKs: macOS 26.2 (macosx26.2)
 
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
 
terminalx git:(main) xcrun simctl list devices booted
-- iOS 26.2 --
iPad Pro 13-inch (M4) (Booted)
 
terminalx git:(main) swift package resolve
Fetching TXCore … resolved
Fetching swift-log 1.6.1 … resolved
 
terminalx git:(main) xcodebuild -showsdks | head -2
iOS SDKs: iOS 26.2 (iphoneos26.2)
macOS SDKs: macOS 26.2 (macosx26.2)
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
backoff caps at 30s
mosh three-phase resume
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) git status --short
M apps/TerminalX/iOS/RailSidebar.swift
M apps/TerminalX/iOS/SessionRouter.swift
?? docs/ui/home-and-close.md
 
 
terminalx git:(main)
0.1 · 日志 · log stream --style compact
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:06:41 terminalx: tmux %window-renamed 0
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:06:41 terminalx: tmux %window-renamed 0
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:06:41 terminalx: tmux %window-renamed 0
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:06:41 terminalx: tmux %window-renamed 0
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
tsnet
mosh41ms
tmuxdev
mac-studio 运行测试 · ~/src/terminalx
竖分屏 · 选择分到哪个会话⌘D 竖分⌘⇧D 横分↑↓ 移动 立即分屏
竖分屏到…mac-studio
tmux 会话
dev
运行测试 · 3 windows · 4 panes
当前
scratch
zsh · 1 window · detached
3 天前
deploy
部署脚本 · 2 windows · detached
昨天
新建 tmux 会话…
原生窗口
不经 tmux · 关 App 即结束
3c关闭 / 最小化:红黄两枚圆点 标题胶囊左侧沿用 macOS 语汇: = 关闭, = 最小化,悬停/触摸才显出符号。黄点不确认,直接回首页、会话继续跑(卡片置顶标「最小化中」)。红点弹一次确认:tmux 默认仅断开,结束会话是次要按钮;原生窗口的文案换成"前台进程会结束"。
ms
u2
nh
TMUX
0
1
2
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
backoff caps at 30s
mosh three-phase resume
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) git status --short
M apps/TerminalX/iOS/RailSidebar.swift
M apps/TerminalX/iOS/SessionRouter.swift
?? docs/ui/home-and-close.md
 
 
terminalx git:(main)
0.1 · 日志 · log stream --style compact80×17
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
12:06:41 terminalx: tmux %window-renamed 0
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:20 terminalx: window title → "运行测试"
tsnet
mosh41ms
tmuxdev
mac-studio 运行测试 · ~/src/terminalx
关闭当前会话 · 等待确认⌘W 关闭⌘M 最小化 仅断开esc 取消
关闭 mac-studio · dev?
tmux 会话(3 windows / 4 panes)。仅断开后服务端继续跑,下次原样接回。
结束会话
取消 仅断开 ⏎
对照原生窗口(无 tmux)
关闭 nas-home · 窗口 1?
没有 tmux 兜底,前台进程会随之结束。想留着就点黄点最小化。
取消 关闭窗口
3d首页 ⇄ 终端:四条路径与返回规则 把两屏之间所有出入口画在一起。进入只有两种(恢复已有会话 / 新建会话),离开有三种(首页键、最小化、关闭),三者都落到同一张落地页——差别只在会话的去向:继续跑 / 后台 detach / 结束。换会话不必回首页,侧边栏里点一下即可。

首页(主机管理) ⇄ 终端主界面

App 冷启动永远落在首页;终端是"进入某个会话"的结果,不是独立 tab。
首页 · 主机管理(落地页)
活动会话(最上排)
三张缩略卡:前台运行 / 后台 detach / 重连中,点卡片即进终端
全部主机(下排)
点主机 → 若有会话则列出可接管的,否则直接新建
从最小化回来
卡片右上角标「最小化中」,点一下瞬间恢复,光标位置不变
冷启动 / ⌘⇧H
都停在这里,不自动进任何会话
进入终端
恢复已有会话
点活动会话卡 / 主机下的会话行 → 直接进终端,恢复到上一个焦点 pane
新建会话
点「新建连接」或主机上的 + → 建好即进终端,侧边栏同步出现该会话
离开终端
首页键(侧边栏第一行)
会话完全不动,随时切回;用于"去看看别的主机"
最小化(黄点)
等同首页键,但明确表达"我待会儿还回来",卡片置顶并标记
关闭(红点)· 二次确认
tmux 默认 detach(后台跑);原生窗口会结束进程,文案单独写
终端主界面 · 沉浸轨道
侧边栏第一行:首页
折叠态显示为图标,展开态显示完整标题;同一条栏、同一个位置,⌘⇧H 随时可用
标题胶囊左侧:红点 / 黄点
红点关闭需二次确认后回首页;黄点最小化不确认,直接回首页、会话继续
活动会话就在侧边栏
切会话不必回首页,回首页是"换任务"而不是"切窗口"
Pin 后常驻
侧边栏钉在左侧时,切会话与看终端可同时进行,无需任何中间层
建议一:"最小化"在 iPad 上没有 Dock 承接,容易被理解成"藏起来找不到了"。仍保留这枚按钮,但把落点讲清楚——回到首页后该卡片置顶并标记「最小化中」,动画从终端缩回卡片,用户就知道东西去哪了。
建议二:"关闭"对 tmux 与原生窗口的后果完全不同,别用同一句确认。tmux 默认 detach 而非 kill,把 kill 放在第二项;原生窗口则明说"进程会结束"。另外给最小化配下滑手势、关闭配 ⌘W,二次确认支持 ⏎ 直接选推荐项。
2沉浸轨道深化 · 无 tmux 主机 / 竖屏降级(跨主机分屏、浮层侧边栏、会话总览三稿已作废)
展开策略(已更新)
原「浮层压在轨道旁」的方案已作废(会出现两套入口)。现行方案:遮罩态面板盖住轨道,Pin 后才推挤终端。见第 3 轮 3a
分屏模型(已更新)
跨主机分屏已取消,分屏只在同一台主机内:tmux pane 由服务端持有、断线保持;原生窗口不经 tmux。新建交互见第 3 轮 3b
无 tmux 主机
轨道隐藏 TMUX 段,换成客户端「窗口」段;胶囊第三格写"无 tmux"。可随时新建与 tmux 无关的窗口。见 2c
竖屏降级
iPad 竖屏:轨道 48pt,pane 改上下堆叠,最多两层,多余折成段控。iPhone:轨道下沉为底部主机条,单 pane + 轻扫。见 2d
会话总览(已取消)
「⌘O 缩放成卡片」的总览层已去掉,轨道底部相应按钮也移除。切会话直接用侧边栏,换任务用「首页」。跳转关系见第 3 轮 3d
保持不变
状态徽标顺序(tsnet → mosh RTT → tmux/窗口)、Nocturne chrome + Catppuccin 终端、硬件键盘时附加行自动收起——五张新稿全部沿用。
2c主机没有 tmux:轨道收起 TMUX 段 轨道下半段不再显示 tmux window 数字条,改为客户端「窗口」段(每个窗口 = 一条独立 SSH channel / mosh 会话),可随意新建。状态胶囊第三格显示「无 tmux」而不是报错。若探测到装了 tmux 但没会话,才在终端顶部给一条可忽略的行内提示——不弹窗、不强推。
ms
u2
nh
窗口
1
2
nas:~$ zfs get compressratio tank
tank compressratio 1.34x
 
nas:~$ docker stats --no-stream | head -3
NAME CPU % MEM USAGE
plex 4.10% 1.21GiB
syncthing 0.80% 312MiB
 
nas:~$ zfs get compressratio tank
tank compressratio 1.34x
nas:~$ uname -sr
Linux 6.12.9-truenas
 
nas:~$ docker ps --format 'table {{.Names}}'
NAMES STATUS
plex Up 6 days
syncthing Up 6 days
caddy Up 12 hours
postgres Up 6 days (healthy)
 
nas:~$ zpool status -x
all pools are healthy
 
nas:~$ df -h /tank
Filesystem Size Used Avail Use%
tank 18T 11T 7.0T 62%
 
nas:~$ zfs list -t snapshot | tail -3
tank/photos@auto-2026-07-24 1.2G
tank/docs@auto-2026-07-24 84M
tank/vm@auto-2026-07-24 3.4G
 
nas:~$ tail -4 /var/log/syncthing.log
folder "photos" sync complete
folder "docs" idle
puller: 0 conflicts
scanner: 12,418 files ok
 
nas:~$ smbstatus --shares | head -3
Service pid Machine
media 4412 100.92.14.7
 
nas:~$ uptime
12:08:03 up 41 days, 3:22, 1 user
 
nas:~$ uname -sr
Linux 6.12.9-truenas
 
 
nas:~$
这台主机上没有 tmux。窗口由 terminalX 客户端维持,mosh 负责断线续传;但关掉 App 后不会像 tmux 那样在服务端继续跑
安装并启用 tmux
tsnet
mosh88ms
无 tmux · 客户端窗口
nas-home~ · 窗口 1 / 2 · 132×46
客户端窗口模式 · 每个窗口一条独立通道⌘T 新建窗口⌘1…9 切窗口⌘W 关闭窗口⌘K 命令面板
2d竖屏 iPad 与 iPhone 竖屏宽度不够并排,规则改为:轨道保留但降到 48pt(拇指可达的左缘),pane 由左右平铺改为上下堆叠,最多两层,第三个 pane 折成顶部段控。状态胶囊压缩成一枚。iPhone 再降一级:轨道变成底部主机条,单 pane 全屏,pane 之间左右轻扫,下拉标题打开会话列表。
ms
u2
nh
0
1
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
 
terminalx git:(main) xcodebuild -showsdks | head -2
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
↳ Suite "tmux control mode"
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
%window-add spawns pane tree
↳ Suite "SessionMachine"
backoff caps at 30s
mosh three-phase resume
host-key pin survives wipe
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) xcrun simctl list devices booted
-- iOS 26.2 --
iPad Pro 13-inch (M4) (Booted)
 
terminalx git:(main) git pull --rebase
From tsnet:athom/terminalx main
Successfully rebased onto main.
 
terminalx git:(main) git status --short
M apps/TerminalX/iOS/ContentView.swift
M apps/TerminalX/iOS/Theme.swift
 
terminalx git:(main)
0.1 · log stream --style compact2/3 pane · 第 3 个已折叠
12:02:31 terminalx: tsnet peer refresh (7)
12:02:58 terminalx: mosh heartbeat 38ms
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:02 terminalx: ghostty frame 16.4ms
12:06:20 terminalx: tsnet peer nas-home down
12:06:41 terminalx: retry scheduled in 8s
12:07:03 terminalx: tmux %window-add 3
12:01:02 terminalx: tmux %output window 0
12:01:19 terminalx: mosh heartbeat 41ms
12:01:44 terminalx: pane 0.1 resized 60x18
12:02:03 terminalx: keychain read host-key
12:02:31 terminalx: tsnet peer refresh (7)
12:02:58 terminalx: mosh heartbeat 38ms
12:03:12 terminalx: ghostty frame 16.7ms
12:03:41 terminalx: tmux %layout-change
12:04:02 terminalx: session dev attached
12:04:31 terminalx: link degraded, rtt 210ms
12:04:33 terminalx: mosh resume ok, 0 lost
12:05:02 terminalx: scrollback trimmed 4k
12:05:44 terminalx: pasteboard bridge ok
12:06:02 terminalx: ghostty frame 16.4ms
12:06:20 terminalx: tsnet peer nas-home down
12:06:41 terminalx: retry scheduled in 8s
12:07:03 terminalx: tmux %window-add 3
mac-studiodev
41ms
esc
ctrl
tab
~
/
|
9:41 78%
mac-studio · dev
41ms
左右轻扫切 pane
tx git:(main) git fetch --all --prune
Fetching origin … done
tx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
 
tx git:(main) xcodebuild -showsdks | head -2
tx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
tx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
↳ Suite "tmux control mode"
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
%window-add spawns pane tree
↳ Suite "SessionMachine"
backoff caps at 30s
mosh three-phase resume
host-key pin survives wipe
◇ 50 tests passed after 0.412s
 
tx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
tx git:(main) xcrun simctl list devices booted
-- iOS 26.2 --
iPad Pro 13-inch (M4) (Booted)
 
tx git:(main) git pull --rebase
From tsnet:athom/terminalx main
Successfully rebased onto main.
 
 
tx git:(main)
esc
ctrl
tab
~
/
|
⌘K
ms
u2
nh
1terminalX · iPadOS 优先 · 选定方案:1b 沉浸轨道终端 + 1e 会话缩略卡
设计前提
画布尺寸 iPad Pro 13″ 横屏 1366×1024pt(1:1)。App chrome 全部走 Nocturne 令牌;终端内容区保留 Catppuccin Mocha,与 chrome 通过同一深靛蓝底相接。文案简体中文,技术术语(mosh / tmux / tsnet)保留英文。
分层状态徽标
三层链路各占一枚徽标,从下到上:tsnet(网络可达)→ mosh RTT(传输健康,数字实时跳动,>200ms 转琥珀)→ tmux 会话名(复用层)。断哪层哪层变色,其余保持中性——避免"全红恐慌"。
iPad 输入取舍
触控时底部常驻 44pt 键盘附加行(Esc/Ctrl/方向/PgUp);检测到硬件键盘则整行收起、只留一条 4pt 提示带,把面积还给终端。pane 分隔线为 12pt 拖拽热区。
选定终端主界面 · 沉浸轨道1b — chrome 全部浮起,终端面积最大
1b终端 · 沉浸轨道 边栏压成 56pt 图标轨道(搜索 · 首页 · 主机 · TMUX window · 设置 · 展开键一应俱全,只是收成图标),chrome 全部浮起为胶囊,终端面积最大。点轨道底部的展开键或 ⌘\ 变成 288pt 完整侧边栏,见 3a
ms
u2
nh
TMUX
0
1
2
terminalx git:(main) git fetch --all --prune
Fetching origin … done
terminalx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
terminalx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
terminalx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
↳ Suite "tmux control mode"
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
%window-add spawns pane tree
↳ Suite "SessionMachine"
backoff caps at 30s
mosh three-phase resume
host-key pin survives wipe
◇ 50 tests passed after 0.412s
 
terminalx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
terminalx git:(main) xcrun simctl list devices booted
 
terminalx git:(main)
0.1 · ubuntu-cn2 · journalctl -f80×14
12:01:19 cn2 mosh-server[891]: heartbeat 41ms
12:01:44 cn2 build-runner: job 39 finished
12:02:03 cn2 sshd[9931]: session opened for ci
12:02:31 cn2 tailscaled: derp hkg 24ms
12:02:58 cn2 mosh-server[891]: heartbeat 38ms
12:03:12 cn2 systemd: rotated build.log
12:03:41 cn2 ninja: 148/148 objects
12:04:12 cn2 tailscaled: endpoint DIRECT (udp)
12:04:31 cn2 kernel: wlan0 rssi -74
12:04:33 cn2 mosh-server: roaming → :51004
12:04:33 cn2 mosh-server: resume ok, 0 lost
12:05:02 cn2 systemd: Started build-runner@42
12:05:44 cn2 sshd: Accepted publickey for ci
12:06:02 cn2 runner: artifact 18.4 MB uploaded
12:06:20 cn2 tailscaled: peer nas-home offline
12:06:41 cn2 cron: rotated /var/log/build.log
12:07:03 cn2 systemd: build-runner@42 ok
tsnet
mosh41ms
tmuxdev
mac-studio~/src/terminalx · 168×44
已连接妙控键盘 · 附加行已收起 ⌘K 命令面板⌘D 竖分屏⌘⇧D 横分屏⌃⇥ 切 window长按 ⌘ 全部快捷键
选定主机管理 · 会话缩略卡1e — 活动会话优先,回到刚才那个会话是首要动作
1e主机 · 会话缩略卡 把「回到刚才那个会话」当作首要动作:上排是活着的会话(真实终端缩略图 + 最后一行输出),下排才是主机网格。适合 2–4 个并行会话来回跳。
9:41 周五 Wi-Fi · 78%

terminalX

3 个会话在跑 · 7 台主机 · Tailscale athom.ts.net
搜索⌘K
新建连接
活动会话
mac-studiotmux dev41ms
tx git:(main) git fetch --all --prune
Fetching origin … done
tx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
 
tx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
tx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
↳ Suite "tmux control mode"
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
%window-add spawns pane tree
↳ Suite "SessionMachine"
backoff caps at 30s
mosh three-phase resume
host-key pin survives wipe
◇ 50 tests passed after 0.412s
 
tx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
tx git:(main) xcrun simctl list devices booted
-- iOS 26.2 --
iPad Pro 13-inch (M4) (Booted)
 
 
tx git:(main)
3 windows · 4 panes · 12 秒前⌘1回到会话
ubuntu-cn2tmux build186ms
cn2 ~ journalctl -u build-runner -n 3 --no-pager
12:05:02 Started build-runner@42
12:06:02 build-runner@42 succeeded
 
cn2 ~ systemctl status build-runner --no-pager
● build-runner.service — active (running)
since Fri 09:12:03 CST; 2h 54min ago
 
cn2 ~ ninja -C build -j 8
[148/148] Linking libmosh-core.a
✓ ninja: no work to do.
 
cn2 ~ ./run-integration.sh --tsnet
▸ joining tailnet as ci-runner…
▸ peer enumeration: 7 nodes
▸ mosh relay loopback:60122 ↔ tsnet
▸ handshake ok, AES-OCB session up
roaming: peer addr switched
resume ok in 1.8s, 0 bytes lost
suspend 90s → wake
resume ok in 2.4s
▸ 12/14 passed, 2 flaky (retrying)
↻ tmux/resize-under-loss
↻ tsnet/derp-failover
 
cn2 ~ tailscale netcheck | head -5
* UDP: true
* IPv4: yes, 203.0.113.9:41641
* Nearest DERP: Hong Kong
 
cn2 ~
1 window · relay hkg · 4 分钟前⌘2回到会话
nas-home重连中
nas:~$ zfs get compressratio tank
tank compressratio 1.34x
 
nas:~$ docker stats --no-stream | head -3
NAME CPU % MEM USAGE
plex 4.10% 1.21GiB
nas:~$ uname -sr
Linux 6.12.9-truenas
 
nas:~$ docker ps --format 'table {{.Names}}'
NAMES STATUS
plex Up 6 days
syncthing Up 6 days
caddy Up 12 hours
postgres Up 6 days (healthy)
 
nas:~$ zpool status -x
all pools are healthy
 
nas:~$ df -h /tank
Filesystem Size Used Avail Use%
tank 18T 11T 7.0T 62%
 
nas:~$ zfs list -t snapshot | tail -3
tank/photos@auto-2026-07-24 1.2G
tank/docs@auto-2026-07-24 84M
tank/vm@auto-2026-07-24 3.4G
 
nas:~$ tail -4 /var/log/syncthing.log
folder "photos" sync complete
folder "docs" idle
 
nas:~$
mosh 会话保活中,8s 后第 3 次重连
屏幕内容已缓存,恢复后原样接回
tsnet 节点离线 · 2 分钟前⌘3立即重试
全部主机
全部生产家里
mac-studio
macOS · M4 Max
moshtsnetSE key
ubuntu-cn2
Ubuntu 26.04
moshtsnet
edge-sg1
Debian 13
SSHtsnet
edge-sg2
离线 · 4 小时
SSH
nas-home
重连中
mosh
pi-lab
Raspberry Pi OS
SSH
mosh-lab
Fedora 44
mosh
添加主机
共用屏设置 · iPhone 对照跟随选定方案
1g设置 · 外观 左类别、右内容。核心是「app chrome 与终端同源换肤」:选一套 Catppuccin,chrome 的中性阶跟着走,Nocturne 的 blurple 始终作为唯一强调色不被覆盖。
9:41 周五 Wi-Fi · 78%

设置

外观与主题
终端与字体
Tailscale
密钥与安全
mosh 与重连
tmux 集成
键盘与手势
诊断日志
terminalX 0.6 (M4) · libghostty · mosh 1.4 · tsnet

外观与主题

App chrome 与终端配色同源:切一次,两边一起变。强调色恒为 Nocturne blurple。
Catppuccin 主题
~ git status
M Theme.swift
Mocha
~ git status
M Theme.swift
Macchiato
~ git status
M Theme.swift
Frappé
~ git status
M Theme.swift
Latte浅色
实时预览
terminalx git:(main) ls -l packages
drwxr-xr-x yz staff 192B TXCore
drwxr-xr-x yz staff 256B TXTransport
-rw-r--r-- yz staff 4.1K Package.swift
 
terminalx git:(main) git diff --stat
SessionMachine.swift | ++++++++---
TmuxController.swift | +++++-
2 files changed, 13(+), 4(-)
 
terminalx git:(main) 中文等宽对齐测试:终端渲染 CJK
宽字符占两格 emoji 归一
制表符对齐 连字 -> ≠
└─ 行高 1.50 · 字号 13.5pt
 
terminalx git:(main) swift build 2>&1 | tail -4
error: cannot find 'foo' in scope
warning: unused variable 'gate'
note: add explicit _ = to silence
✓ 编译完成 · 14.2s
 
terminalx git:(main) tailscale status | head -3
100.71.203.4 mac-studio direct
100.88.9.61 ubuntu-cn2 relay hkg
100.104.2.18 nas-home offline
 
terminalx git:(main) tmux list-panes
0.0 [124x38] zsh (active)
0.1 [ 60x18] btop
0.2 [ 60x19] tail -f build.log
 
terminalx git:(main) echo $TERM
xterm-256color · truecolor
 
terminalx git:(main)
排版
终端字体
JetBrains Mono
字号13.5pt
行高1.50
连字(ligatures)
-> ≠ 合并显示
CJK 等宽补偿
宽字符严格占两格
跟随系统浅/深色
深色 Mocha ⇄ 浅色 Latte
终端配色由 libghostty 渲染;chrome 的中性阶与所选主题同源推导,强调色始终取 Nocturne blurple。
1hiPhone 紧凑对照 同一套令牌降级:边栏→底部 tab,pane 平铺→单 pane + 顶部 pane 段控,附加行两行滚动。
9:41 78%
mac-studio
tmux dev · 0 build
41ms
0.0 zsh
0.1 btop
0.2 log
80×34
tx git:(main) git fetch --all --prune
Fetching origin … done
tx git:(main) swiftformat --lint Sources
✓ 0 issues in 84 files
 
tx git:(main) xcodebuild -showsdks | head -2
iOS SDKs: iOS 26.2 (iphoneos26.2)
tx git:(main) swift build -c release --arch arm64
[142/142] Compiling TXCore
[ 8/8 ] Linking TerminalX
✓ build complete (14.2s)
 
tx git:(main) swift test --package-path packages/TXCore
◇ Test run started.
↳ Suite "tmux control mode"
parses %output escaped octal
layout diff keeps pane identity
DCS passthrough detected
%window-add spawns pane tree
↳ Suite "SessionMachine"
backoff caps at 30s
mosh three-phase resume
host-key pin survives wipe
◇ 50 tests passed after 0.412s
 
tx git:(main) xcodegen generate --spec project.yml
✅ Created TerminalX.xcodeproj
 
tx git:(main) xcrun simctl list devices booted
-- iOS 26.2 --
iPad Pro 13-inch (M4) (Booted)
 
tx git:(main) git pull --rebase
From tsnet:athom/terminalx main
Successfully rebased onto main.
 
tx git:(main) git status --short
M apps/TerminalX/iOS/ContentView.swift
M apps/TerminalX/iOS/Theme.swift
?? docs/ui/ipad-rail.md
 
 
tx git:(main)
esc
ctrl
tab
~
/
|
⌘K
9:41 78%

主机

搜索
活动会话
mac-studio
tmux dev · 3 windows
41ms
swift test --package-path TXCore
◇ 50 tests passed after 0.412s
nas-home
重连中 · 8s 后第 3 次
重试
全部主机
ubuntu-cn2
ci@100.88.9.61 · mosh
edge-sg1
root@100.77.4.2 · SSH
nas-home
yz@100.104.2.18
pi-lab
pi@100.104.2.9 · SSH
edge-sg2
离线 4 小时
Tailscale 已连接
iphone · 100.92.14.11
主机
会话
密钥
设置

下一步:细化 1b 的 pane 拖拽 / 缩放态,或把 1e1b 串成可点原型。