From 0ee8d748c028ad5257f95e15db38646aecd2851b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 09:32:02 -0300 Subject: A root focus file names the pane with the keyboard and moves it; a pane's ctl says whether it is current Scripts had no way to ask which pane has the keyboard or to give it one. rio answers both through a window's wctl: its read ends with current or notcurrent, and a write of current takes the keyboard (rio(4)). A pane's ctl line now ends the same way, and since there is one keyboard for the whole tree, /focus reads the focused pane's serial and takes a serial to move the keyboard there, off any header that had it; a serial no pane has fails with "no such window". fs-bench's stale readdir check is fixed too. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index 354932b3..5e2280f9 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -52,6 +52,7 @@ $m/log recent events, then EOF: new|del|rename|save , msg (exec 3<>$m/log; echo follow >&3; cat <&3 waits for new ones; tail -f does not) $m/screen the rendered screen as JSON, frozen per open $m/listeners this session's dial addresses +$m/focus the serial of the pane with the keyboard; echo a serial into it to move the keyboard $m/pane/new open it to make a pane, read names it; rmdir $m/pane/ closes it $m/os/ the host filesystem ``` @@ -130,7 +131,10 @@ written until someone writes or truncates it, so writing an address and reading it back evaluates it, and two clients addressing the same pane will interfere. `$pane/ctl` reads acme's window status line — serial, tag length, body length, a reserved zero, the dirty flag, the width in cells, the font and the tab -width — and takes the one verb `get`. +width, then `current` or `notcurrent` — and takes `get` (reload from disk) and +`lock`/`unlock`. The lock binds only clients that take it, and is held by the +open that wrote it, so a shell holds an fd across the edit: +`exec 3>$pane/ctl; echo lock >&3; ...; exec 3>&-`. Terminal panes have no file: writing their `body` sends child input, and truncation does not erase terminal history. -- cgit v1.3