Terminal borders that don't cost a cell
Web page · https://joshka.net/cell-borders
First seen by Oriel on .
AI summary
The post proposes a draft terminal protocol for drawing configurable borders on cell edges, preserving layout space while enabling richer Ratatui interfaces, with a working Ghostty patch and box-drawing fallback.
- Each cell can carry up to twelve line segments with independent color, width, placement, and style; borders scroll, erase, insert, and reflow with text.
- The DCS protocol supports a cursor-held pen, rectangle commands, and capability detection; unsupported terminals ignore the sequences, allowing applications to fall back to box-drawing characters.
- Shared edges merge by priority, width, and position, while optional features include solid, double, dashed, or dotted lines, rounded joints, and outside colors.
- The Ghostty implementation adds about 1,650 lines and 16-bit border IDs without enlarging cells, while the never-freed border table could consume roughly 10-15 MB.
- Version 1 has only been built on macOS; GTK and OpenGL are untested, rendering is unbenchmarked, and multiplexers need protocol awareness or must force fallback.
#terminal protocols #tui #ghostty #ratatui
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 420, latest observation ; +415 over observed period since
- Lobsters: 62, latest observation ; +61 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 216, latest observation ; +216 over observed period since
- Lobsters: 60, latest observation ; +60 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50491423 | https://www.joshka.net/cell-borders/ Read discussion |
| Lobsters | akdy9z | https://www.joshka.net/cell-borders/ Read discussion |