summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 00:35:37 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:53:17 -0300
commit28c74918cde4092d964daa847c026ed3de282683 (patch)
tree29245d17029b95f4676a821fa0e3ce1eaf95ec3e /README.md
parent3a4f79f40038b880e4d7c88f5651f410cf016191 (diff)
downloadpardes-28c74918cde4092d964daa847c026ed3de282683.tar.gz
pardes-28c74918cde4092d964daa847c026ed3de282683.zip
A terminal pane draws the kitty graphics its program places, so yazi's image and PDF previews show
yazi asks the pane XTVERSION, and ghostty-vt answers "libghostty": yazi takes it for Ghostty and sends its previews by the kitty graphics protocol with Unicode placeholders (a=T,U=1, then U+10EEEE cells). ghostty-vt stored the images, but nothing drew them: the placeholders showed as tofu in the GUI and as raw codepoints in the tty, in every build since terminal panes answered queries (vkznsvzs, 2026-07-01). Before that no query was answered and yazi fell back to chafa's text art. Each frame, TerminalImages.zig reads the active screen's images and placements (virtual ones through their placeholder runs, and ones placed on a cell), cuts each into the cell rows it covers, maps those rows through the body's own row walk, clips them to the pane, and hands them on as ImagePlaces with exact geometry (NativePlacement.exact). The GUI draws them as textures; the tty passes them to an outer terminal with kitty graphics as one placement per row, its source cropped to whole cells. Placeholder cells draw no text. Scrolling, a delete, a resize, the alternate screen and a closed pane all fall out of reading the emulator's state every frame. A pane now knows its size in pixels: CSI 14/16/18 t are answered, the emulator's width_px/height_px follow the shell's cells, and the pty's winsize carries pixels (host_io.ptyWinsize), so yazi and a nested pardes size their images right. ghostty-vt's image store is 64 MiB per screen (its library default, 10 MB, refused a large preview), PNG transmissions are decoded with stb_image, and RGB images are converted only while shown. test/yazi_preview.py runs yazi in a hidden window on a PNG and a PDF and checks the captures, also through a tty pardes nested in the pane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions