From 0bb65902ebec104dac954b59f28500812419e1af Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 00:45:14 -0300 Subject: A terminal's kitty graphics draw as glyph art where pixels cannot, and by choice: Petscii on the pane, TermImages for new ones Under an outer terminal without kitty graphics a tty pardes cannot pass a terminal pane's images on, so it draws them itself as an image pane's Petscii does: each row of an image is matched to C64-palette glyph art over the cells it covers (GlyphArt.renderRect, the exact-grid half of GlyphArt.render), cached while it is on screen. yazi is still told the kitty protocol works, so it keeps sending its previews. The same art is a choice anywhere: the Petscii builtin now takes a terminal pane too (PaneKind.picture), flipping its images between pixels and glyphs, and a terminal holding images, or drawing them as glyphs by choice, says petscii:on|off in its tag as an image pane does. TermImages real|petscii (default real) is what a new terminal starts with; it is in DumpConfig, /ctl and the reference. Co-Authored-By: Claude Opus 5.5 --- src/tagline.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tagline.zig') diff --git a/src/tagline.zig b/src/tagline.zig index 9bd49eef..032fb5a0 100644 --- a/src/tagline.zig +++ b/src/tagline.zig @@ -124,6 +124,10 @@ pub fn pathPrefix(arena: std.mem.Allocator, pane: *Pane) ![]const u8 { // Unsaved text shows on the grip, as acme's modbutton does, not as a // mark in the text: the prefix is the name alone. if (pane.file) |f| return if (pane.prompt == .name) pane.input.own orelse f.path else f.path; + // A terminal showing kitty graphics says how it draws them, as an image + // pane does, and so does one drawing them as glyph art by choice. + if (panes.terminal.petscii(pane)) |on| if (on or panes.terminal.hasImages(pane)) + return std.fmt.allocPrint(arena, "{s} petscii:{s}", .{ (try shownDir(arena, pane)), if (on) "on" else "off" }); return (try shownDir(arena, pane)); } -- cgit v1.3