Expand description
Terminal side of Cellix: choosing a rendering tier and presenting grids.
Modules§
- clipboard
- Paste events from the Kitty clipboard protocol (OSC 5522), which is how a terminal hands over a picture: OSC 52 carries only text. With mode 5522 on, a paste doesn’t arrive as bracketed text but as a list of what the clipboard holds, with a one-time password. The program asks for the kind it wants with that password, and the terminal sends it without asking the person, since they pressed paste. Kitty since 0.44.1 and Ghostty since 1.4 do this. Spec: https://rockorager.dev/misc/bracketed-paste-mime/ and kitty’s clipboard page.
Structs§
- Bleed
- How far tiles reach past the text area. Ghostty doesn’t clip images, so a tile can cover its right and bottom padding, which no cell can. Left and top stay out of reach, and the frame there is the terminal’s own colour.
- Cell
Backend - Styled text cells. Works everywhere, so every feature must work here.
- Env
- What detection found about the environment.
- Pixel
Backend - Renders each row once as a tile, keeps it in the terminal’s image store, and moves it by reference, so only new content crosses the wire.
- Smooth
- How a region animates. Direct placement only, since only that can sit between cells.
Enums§
- Multiplexer
- Notice
- Which sequence a terminal reads.
- Placement
- How tiles reach the screen. See the tier table in
docs/DESIGN.md. - Tier
- How frames reach the terminal. See the tier table in
docs/DESIGN.md.
Constants§
- DEFAULT_
QUOTA - Decoded image memory Cellix keeps in the terminal. Kitty’s default limit is 320 MB and other terminals’ are lower, so this stays well inside them.
Traits§
- Backend
- Presents a grid. Implementations send only what changed since the last call.
Functions§
- background
- Asks the terminal for its background again, as when Cellix comes back into focus: it may have turned from light to dark since Cellix started. Must run in raw mode, between reads of input. Gives whether it’s light, and its colour, when the terminal said.
- detect
- Works out what this terminal can do. Must run in raw mode, before input is read.
- notification
- The bytes that show
titleandbodyas a notification. Inside tmux they’re wrapped to go past it to the terminal, which tmux allows withallow-passthrough. - row_key
- What a row looks like, as a key: rows with the same key draw the same pixels.
- select_
tier - Picks a tier. A user setting wins. Otherwise this is the design’s table: tmux needs placeholders, and anything else that speaks Kitty graphics gets direct placement.
- terminal_
names - What the terminal is called, from the environment through
var, and from tmux when Cellix runs inside it: thereTERMnames tmux, and over SSH it’s often a stand-in.