Skip to content

Commit 9639d41

Browse files
feat: add tmux-like split panes to boo ui
Generalizes boo ui's single-viewport client-side compositor into a tiling tree of panes. Each pane is an independent connection to a session daemon (one socket + one local libghostty terminal), so the daemon and wire protocol are unchanged. Bindings (prefix C-a): - C-a | / C-a - split the focused pane side-by-side / stacked, opening a new session sized to the new pane - C-a + arrows move focus between panes when more than one exists (otherwise the arrows browse/resize the sidebar as before) - C-a o cycle to the next pane - C-a x close the focused pane (its session keeps running) Panes are polled together, rendered with clipped per-pane rows and dividers, and collapse back into their sibling when a session ends. Closes #67 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 055a0d4 commit 9639d41

3 files changed

Lines changed: 968 additions & 270 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Bindings follow GNU screen's defaults, including the `C-x` variants
8181
| `C-a l`, `C-a C-l` | redraw |
8282
| `C-a a` | send a literal `C-a` |
8383

84-
`boo ui` adds additional keybinds for switching, resizing and hiding the sidebar, creating sessions, and killing them.
84+
`boo ui` adds additional keybinds for switching sessions, resizing and hiding the sidebar, creating and killing sessions, and splitting the view into tmux-like panes (`C-a |` / `C-a -`) navigated with `C-a` and the arrow keys. See `boo help ui` for the full list.
8585

8686
### Automation
8787

@@ -175,8 +175,9 @@ your terminal <-(raw tty)-> boo client <-(unix socket)-> session daemon
175175
This is a young project, not a drop-in GNU screen replacement:
176176

177177
- One attached client per session (attaching steals); no `-x` sharing.
178-
- One window per session: no splits or tabs inside a session. Run one
179-
session per task and juggle them with `boo ui`.
178+
- A plain `boo attach` is one window per session: no splits or tabs.
179+
`boo ui` tiles sessions into split panes (`C-a |`, `C-a -`), but each
180+
pane is still a separate single-window session.
180181
- The `C-a` prefix is not yet configurable, and pasted bytes containing
181182
`0x01` are interpreted as the prefix (GNU screen has the same quirk;
182183
`boo ui` is immune thanks to bracketed paste).

src/help.zig

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,23 @@ pub const commands = [_]Entry{
138138
\\
139139
\\keys (prefix C-a, control variants match GNU screen):
140140
\\ C-a c create a session and focus it
141+
\\ C-a | split the focused pane left and right, opening a
142+
\\ new session in the new pane
143+
\\ C-a - split the focused pane top and bottom, opening a
144+
\\ new session in the new pane
145+
\\ C-a o focus the next pane
146+
\\ C-a x close the focused pane (its session keeps running)
141147
\\ C-a k kill the focused session (asks y/n)
142148
\\ C-a r rename the focused session
143149
\\ C-a g go to a session by name (best match)
144150
\\ C-a n focus the next session
145151
\\ C-a p focus the previous session
146-
\\ C-a Up, C-a Down
147-
\\ browse the session list without attaching:
148-
\\ Up/Down move the selection, Enter attaches it,
149-
\\ Esc returns to the focused session
150-
\\ C-a Left, C-a Right
151-
\\ resize the sidebar: Left/Right adjust the width,
152-
\\ Enter keeps it, Esc restores the previous width
152+
\\ C-a Up, C-a Down, C-a Left, C-a Right
153+
\\ with more than one pane, move focus to the pane in
154+
\\ that direction. With a single pane, Up/Down browse
155+
\\ the session list (Enter attaches, Esc returns) and
156+
\\ Left/Right resize the sidebar (Enter keeps it, Esc
157+
\\ restores the previous width)
153158
\\ C-a s show or hide the sidebar; the viewport takes the
154159
\\ full width while it is hidden
155160
\\ C-a C-a focus the previously focused session

0 commit comments

Comments
 (0)