<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pardes.git/src/tty/tty.zig, branch main</title>
<subtitle>Pardes</subtitle>
<id>https://git.0x4200.cafe/pardes.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/pardes.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/'/>
<updated>2026-10-02T03:46:14Z</updated>
<entry>
<title>A mouse report before the first row or column (SGR's 0, a drag past the window's top or left, in cells or 1016's pixels) is the window's edge in the terminal and the ESP32 shells, never a panic that lost unsaved text; the GUI already clamped</title>
<updated>2026-10-02T03:46:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-02T03:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=b70ef491f1553929920b9b653ad3240466478e3e'/>
<id>urn:sha1:b70ef491f1553929920b9b653ad3240466478e3e</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Back and Forward keep to the focused file: Ctrl-o, Ctrl-i, the mouse's side buttons (now the tty's 8 and 9 too), the builtins and 9P go to the nearest place that way in this pane, else in this file in another pane, else of any file; JumpScope all takes every place in order as before</title>
<updated>2026-10-01T21:02:10Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T20:52:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=afec162464d360cbbf475d3fb7457cda83ce918f'/>
<id>urn:sha1:afec162464d360cbbf475d3fb7457cda83ce918f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>A terminal pane draws the kitty graphics its program places, so yazi's image and PDF previews show</title>
<updated>2026-10-01T03:53:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T03:35:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=28c74918cde4092d964daa847c026ed3de282683'/>
<id>urn:sha1:28c74918cde4092d964daa847c026ed3de282683</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>An editor's private pardes-osc133 prompt files go at Exit and at a fatal signal, and a start sweeps the ones a dead editor left</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T00:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=30011f7269d0febdefbb4c907f8a28d932f44f6f'/>
<id>urn:sha1:30011f7269d0febdefbb4c907f8a28d932f44f6f</id>
<content type='text'>
/tmp had gathered thousands of private prompt files: Exit removed its
own, but an editor killed by a signal, or a crashed one, left them for
ever. They now carry their editor's pid in the name, a SIGTERM or
SIGHUP removes them before the signal's death, and each start removes
those whose pid kill(pid, 0) answers ESRCH for. Files of the older
shape carry no pid and are left alone, as a running older editor may
still read them; the shared ones in the runtime directory are kept,
being every session's.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>An editor killed with SIGTERM or SIGHUP removes its 9P socket, and a start sweeps the pardes-9p-&lt;pid&gt;.sock files whose pid is gone</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-01T00:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=4e5719a133030e8ed29799d4959bb0b917092d7c'/>
<id>urn:sha1:4e5719a133030e8ed29799d4959bb0b917092d7c</id>
<content type='text'>
The runtime directory had gathered a hundred sockets of dead editors:
only a clean exit removed its own, and a signal or a crash left it. The
terminal's kill handler and, where nothing else handles the signals, a
handler of the listener's own now unlink the socket before the signal's
death. At listen, each pardes-9p-&lt;pid&gt;.sock whose pid kill(pid, 0)
answers ESRCH for, that is a socket of this user's and that nothing
answers on, is removed; a live pid's, a named session's and anything
else are never touched.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Release Pardes 0.9</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T19:10:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=9c7e540dfc3d750514e0ae3450d99ec21886c9c1'/>
<id>urn:sha1:9c7e540dfc3d750514e0ae3450d99ec21886c9c1</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>The window's F1-F24, Insert, Print Screen, Scroll Lock, Pause and Menu keys reach a terminal's program, which they never did; every key a program gets follows its cursor keys' mode and kitty keyboard flags, pinned for both shells</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=8262f315538b70ab8a123ef1e9346f25b25ec939'/>
<id>urn:sha1:8262f315538b70ab8a123ef1e9346f25b25ec939</id>
<content type='text'>
The keys went through ghostty's encoder already (DECCKM, the kitty flags);
the GUI's native key map simply dropped the function and editing keys it
did not name.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A program that asked for focus reports (1004) hears CSI I when its pane takes the keyboard and CSI O when it gives it up, to another pane, a tag or another window</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=17c0d06618085de8d0bbf8152750ffa862db0080'/>
<id>urn:sha1:17c0d06618085de8d0bbf8152750ffa862db0080</id>
<content type='text'>
The core has a window-focus event now, from SDL's window focus and from
the tty's own focus reports (vaxis turns 1004 on outside); the detached
wire carries it: version 10. The test shell's ESC]777;mouse;focus;&lt;1|0&gt;
fakes the window's.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A mouse event carries Shift and Alt as well as Ctrl, from SDL and from the tty's input; a program's wheel report carries them as xterm counts them, and Shift keeps the wheel pardes's own scroll</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T17:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=3f6733c805d873a7af6a6064ace0cf5916f481da'/>
<id>urn:sha1:3f6733c805d873a7af6a6064ace0cf5916f481da</id>
<content type='text'>
The reports are ghostty's encoder now (shift+4, meta+8, ctrl+16), with the
mode and format ghostty tracks. The detached wire carries the two new
bits: version 9. The test shell's ESC]777;mouse takes an optional fifth
field of modifiers.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>A tty editor killed with SIGTERM or SIGHUP puts its terminal back before it dies</title>
<updated>2026-10-01T03:12:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-09-30T16:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/pardes.git/commit/?id=d51e1cd8d7344738ca04578beb8731ab72235a07'/>
<id>urn:sha1:d51e1cd8d7344738ca04578beb8731ab72235a07</id>
<content type='text'>
A nested pardes killed in a pane died with the default action. That left
the pane's terminal on the alternate screen, in raw mode, with mouse and
paste reporting on, so the shell under it was unusable until a reset. The
tty frontend now handles both signals: it writes the resets a clean exit
writes (keyboard protocol, mouse modes, focus, bracketed paste, SGR,
cursor, main screen) and restores the cooked termios, all
async-signal-safe. Then it dies of the same signal, since SA_RESETHAND put
the default back. fs.py kills a tty session with each signal and checks
for the main-screen switch and cooked mode; it fails without the handler.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
