RC RANDOM CHAOS

Cell Borders: Terminal Protocol Skips the Space Penalty

· via Hacker News

Original source

Terminal borders that don't cost a cell

Hacker News →

Terminal UI designers face a persistent trade-off: borders consume precious screen real estate. Unicode box-drawing characters occupy entire cells for lines, forcing compromises between visual structure and functional space. A proposed new terminal protocol called “cell borders” eliminates this constraint by rendering borders as cell attributes rather than glyphs, allowing frames to coexist with content without displacement.

The protocol attaches up to twelve line segments per cell—covering edges and center—as invisible attributes that occupy space on cell margins rather than within cells. It supports solid, dashed, double, and dotted line styles with configurable rounded corners, and automatically merges borders when adjacent cells draw on shared edges. The design has been implemented in patches to Ghostty and Rio terminals, with working demos built in Ratatui.

The benefits are immediate: no screen real estate lost to decoration, text can run directly to frame edges, input fields get proper underlining, and borders never appear in copy-paste selections. The specification includes a capability detection mechanism and fallback behavior, enabling applications to gracefully degrade to traditional box-drawing characters on unsupported terminals.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.