Static

Terminal borders that don't cost a cell

First reported by Joshka ·

The signal ●○○○ Compiled by AI from Joshka and Hacker News
Why you might care

Terminal applications can now render borders and fine details without sacrificing precious screen real estate.

What happened

Developer Joshka.net has created a new terminal protocol that draws borders directly on cell edges rather than using Unicode box-drawing characters. This method, demonstrated in patches for the Ghostty terminal emulator and implemented with the Ratatui TUI framework, allows for borders, underlines, and rounded corners without consuming entire rows or columns. Traditional Unicode borders often take up valuable screen space, leading to less efficient layouts and text wrapping issues. The new protocol stores border information as a cell attribute, similar to background color, enabling borders to scroll and erase with text. It supports various line styles, rounded corners, and priority merging for adjacent borders. A capability query allows terminals to indicate support, with fallback to traditional box characters if unsupported. This approach aims to improve the aesthetics and space efficiency of terminal user interfaces.

What it means

This innovation signals a departure from the limitations of Unicode box-drawing characters in TUIs, addressing a long-standing design challenge. By treating borders as cell attributes, the protocol offers greater flexibility and efficiency, allowing for denser information display and more visually appealing interfaces. Terminal emulator developers and TUI framework maintainers are the primary audience for this technology, with potential adoption impacting user experience across many command-line applications.

The success of this cell-border protocol hinges on its adoption by terminal emulator developers. If widely integrated, it could lead to a significant visual and functional upgrade for TUIs, making them more competitive with graphical interfaces in terms of design and usability. Developers should monitor terminal emulator updates and TUI library support for this new feature, as it may influence future UI design decisions and tooling choices.

AI-written summary. May contain errors.

Terminal