Moving the desktop into the terminal¶
Mid-October 2026. Reconstructed on 4 November 2026 from development and test notes.
The graphical sidebar proved that the tablet could support a small desktop, while the tmux and SSH workflows showed how useful the same applications could be from a larger keyboard and screen. Pocket developed around a terminal display interface that both environments could present.
Python owns application state, windows, focus, menus, and saved layouts. Views provide character cells with foreground and background colors. On the N810, the patched Linux console converts those colors to RGB565. A laptop terminal displays the corresponding escape sequences. The host can also embed a conventional terminal application through a pseudo-terminal, preserving that application's own input handling.
This gives two practical SSH workflows. A terminal client can attach to a workspace running on the tablet. Alternatively, Pocket can run on the laptop, draw locally, and attach to tablet services through forwarded Unix sockets. The service contract carries snapshots, events, and commands; the desktop owns its local layout and interaction state.
Watch the current window controls¶

The current desktop, captured on a laptop on 4 November. Calendar has the active border; Help remains visible underneath. Ctrl-], then m enters window movement. The recording shows the move and the following resize.
The laptop keyboard walkthrough shows Help, the application menu, moving and resizing a window, maximizing it, changing desktops, and switching focus. It was recorded from the current source on 4 November, after the development described here.
The overview and backgrounds recording also shows desktop miniatures, larger window previews, choosing a window across desktops, and the animated effects. It uses a fresh local session recorded on 4 November.
Making instance state explicit¶
The laptop introduced a new lifetime: several shells could consume the same services while keeping independent layouts. The launcher therefore gives each instance a separate desktop state, application-state directory, and station database. The current command construction is visible in the launcher source.
These examples run the local source with two named state namespaces. A connection is selected inside each instance. Separating state also made it possible to compare a new layout without overwriting the everyday desktop.
Keeping cell composition compact¶
The current compositor stores three arrays for a window's cells:
| Array | Information per cell | Storage per cell |
|---|---|---|
| Glyph | The character to draw. | 4 bytes |
| Ink | Foreground, background, and color attributes. | 8 bytes |
| Validity | Whether the stored cell can be reused. | 1 byte |
The surface allocator creates those arrays and releases them together if allocation fails.
The arrays account for 13 bytes per cell before the surface structure and output capacity. The representation makes unchanged-cell comparisons and retained planes relatively cheap. Application models and scene preparation still have their own memory and execution costs.
The window and the service feeding it have different lifetimes. Closing a window can discard its plane and view workers. The acquisition owner continues to hold the radio or shared data store, so another window can open against the same source.
The renderer experiments deliberately exercised expensive paths: overlapping windows, geometry, terrain, water, shadows, and changing scenes. They exposed startup cost, repeated serialization, blending, and input delays that ordinary static panels could hide. Subsequent posts trace the measurements that came out of those workloads.
Code, tests and build inputs¶
| Material | Repository files |
|---|---|
| Implementation | Desktop launcher (GitHub) Native compositor (GitHub) Native windows (GitHub) |
| Checks and fixtures | Window composition (GitHub) Keyboard navigation (GitHub) Desktop control (GitHub) |
| Build inputs | Native build helper (GitHub) Pocket build targets (GitHub) |