ctx terminal

A unicode, sixels, graphics, audio and vectors terminal.

The terminal supports vector graphics ala the HTML5 Canvas 2D graphics through the ctx text protocol in a similar manner to how DEC's ReGIS and ripscript have attempted to provide richer graphics experiences in the past.

sixels and other forms of raster graphics are supported, but with modern displays having high pixel density, the bandwidth required for good raster graphics starts falling apart.

Before integration of the ctx protocol, the ctx terminal did minimal more minimal rendering/updates - while still rendering with ctx, this made fullscreen terminals more usable on high pixel density displays. Even with 4 rendering threads sharing the overhead input latency suffers, continued work on hashing and other performance enhancement, perhaps even GPU, will hopefully bring latency back down.

Exhaustive list of supported escape sequences acts as a refererence for further development and a shorthand cheat-sheet for writing code for the terminal.

ametmeric palette
The built-in 16 color palette is optimized for legibility for both trichromats and dichromats
ctx vector graphics
Using the ctx protocol, by first entering ctx mode with \e[?7020h which creates a new or accesses an existing vector drawing context for the current line.
atty
audio recording and playback (only raw pcm for now, opus codec NYI)
sixels
DEC compatible raster encoding, with 6row high 1bit raster lines * colors used.
kitty graphics
iterm2 inline images
iterm2 inline image image protocol in one bulk base64 transfer
mouse xterm
xterm mouse reporting modes - somewhat incomplete
dterm
Most of dterms window management integration.
pixel mouse
escape sequence to get pixel coordinates for mouse events
UTF-8
The terminal uses 7bit control codes, and reserves bytes>127 for use in character data.
vt102 escapes
>100 points on the vttest score card
ECMA-48 colors
The standard defining the 16 colors
ECMA-48 justification
Only implementing wordwrap for now, can be extended with more.
ECMA-48 proportional
Limited predictable proportional rather than monospaced text, for best results render proportional text in a finall pass, starting with left most column.

Missing and desirable features

F1 F2 F3 .. missing
Cursor setting
Drag to select in vim
The final result of the interaction is correct, but intermediate frames are perhaps not queued for draw?
RTL
Palette setting
Like in the ametameric test-drive sequences.
Key-event confusion when changing layouts
probably ctx is at fault.
/dev/tty in flatpak
The pty is somehow not completely correctly bound between sandbox and host.
color emoji

only code 1049 works fully specs compliant, the others leave the cursor in the wrong spot.