Commit graph

190 commits

Author SHA1 Message Date
Johan Nenzén
3dc4f8d5aa docs: add kmp-terminal and SSH Client for Android to graphics protocol 2026-10-29 20:58:38 +00:00
Zhizhen He
1e273aa289 Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
Kovid Goyal
4bafcb9a7c
Graphics protocol: Add sub-feature querying
Fixes #10732
2026-10-25 09:59:12 +05:30
Kovid Goyal
2efa09dd07
Fix #10684 2026-10-18 08:28:21 +05:30
Kovid Goyal
50ede63f29
... 2026-10-16 07:05:23 +05:30
Kovid Goyal
535c7502e8
Graphics protocol: Add indexed color image formats
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Add two new image formats, f=8 with one byte per pixel that is an index
into the terminal color palette and f=16 with a palette index followed by
an alpha byte. Indices 0-247 are the SGR 256 color table entries and
248-255 are special colors: default background, default foreground,
selection background and foreground, cursor, cursor text, URL color and
one reserved slot. Such images change color automatically when the
terminal colors change.

The images are uploaded as integer textures and drawn by a separate
shader program that looks up colors in the existing per window color
table uniform block, so a color scheme change costs nothing extra and
rendering of normal images is unaffected. Programs are switched only at
boundaries between runs of indexed and normal images in draw order. The
shader does bilinear filtering after the palette lookup since integer
textures cannot be filtered. Animation and frame composition are not
supported for these formats.

Closes #10666
2026-10-15 22:05:23 +05:30
Kovid Goyal
87ab3e98f4
Graphics protocol: Fix file descriptor leak that can be triggered by malicious clients
Also make failure responses generic to avoid leaking any filesystem
information to failed opens
2026-09-14 21:03:15 +05:30
Kovid Goyal
1de47c6cf4
...
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-08-30 21:12:41 +05:30
Kovid Goyal
8dd6436917
Fix #10423 2026-08-30 21:12:13 +05:30
Kovid Goyal
22042970cf
Be more explicit about allowed SHM name format
This was already covered by the POSIX spec, but there are apparently
some clients that still get it wrong, so make the requirement explicit.

IMO terminals should not be allowing clients to skip the leading slash,
it just papers over the bug in the client.

Fixes #10422
2026-08-30 07:27:48 +05:30
btpence
a31c70bc2f
Add AbsoluteTelnet/SSH to graphics protocol documentation
Added AbsoluteTelnet/SSH as a terminal implementing the graphics protocol.  Absolute supports the full suite of features of the kitty graphics protocol.  See https://www.celestialsoftware.net/kitty-graphics-protocol for examples.
2026-08-28 11:45:14 -05:00
Kovid Goyal
d52c8f80ab
awrit has been abandoned replace with terminal-browser 2026-08-28 21:42:53 +05:30
Dmitry Kozlov
0e3e3100af docs: add Mobile SSH to terminals implementing the graphics protocol 2026-08-25 18:16:52 -07:00
Kovid Goyal
05444e9e61
Fix #10391 2026-08-23 08:18:59 +05:30
Leah Amelia Chen
81e0a86791
docs/graphics-protocol: replace demo image
The "Lenna" test image has been deprecated for several years at this
point in the computer graphics scientific community for being an
unauthorized, cropped scan of a Playboy magazine that is not only legally
problematic regarding redistribution (see #661) but also raises questions
about the appropriateness of using originally pornographic material in
scientific literature. **If scientific journals now find it unacceptable,
so should we, and we should do better**.

The image itself has been long gone from the repo itself following #661,
but it's still present in a screenshot attached to the documentation.
Although that resolved legal issues for Debian packaging, I think the
fundamental problem with the Lenna image remains unsolved, and over the
past 8 years the scientific consensus (and more importantly, the
sentiment from the model herself, Lena Forsén) has been very clear that
we shouldn't use this image in any shape or form now. So let's replace it
with something actually wholesome and thematically appropriate!

Instead, I've taken a screenshot of `gr.py`, but with Lenna replaced with
a photo of a friend's cat. I took the original photo myself and licensed
it under CC0 — no attribution is required, though it would certainly be
welcome. Some minor things about the composition have been changed, such
as the proportions of the images and the font used (sorry, I don't know
which font the original used, I'm using Iosevka here since it's my system
monospace font), but overall it shows off the capabilities of the
Graphics Protocol as well as the original.

Please let me know of any feedback regarding the image selection and the
composition, but I think this is a worthy step to take.
2026-08-21 15:40:56 +08:00
Kovid Goyal
f5b4722c68
Fix incorrect key being used for animation compose
Regression in 0.45.0
Fixes #10379
2026-08-21 10:31:17 +05:30
Kovid Goyal
9b29654e90
clarify behavior of leading and trailing commas in the graphics protocol 2026-08-20 15:49:38 +05:30
Kovid Goyal
9bb664ee3c
Switch from sphinx-inline-tabs to sphinx-design
sphinx-design gives us more capabilities such as cards and grids
2026-08-09 14:31:33 +05:30
MiguelRegueiro
f7280f458c Add elio to graphics and DnD support lists 2026-08-05 20:12:23 +02:00
Alex Myczko
2be09a7f1b
Add chawan as a TUI web browser option 2026-08-04 21:05:20 +02:00
Valentin Shergin
faec3fc63d Add malevich to graphics protocol support list 2026-08-03 15:51:10 -07:00
Mish Ushakov
638b6f3eb7
Add desktui to the list of applications using the graphics protocol
desktui is a VNC client that renders the remote framebuffer with the
graphics protocol, one remote pixel per terminal pixel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 00:06:55 +02:00
Kovid Goyal
d994a47fc8
Cleanup previous PR 2026-06-19 11:36:43 +05:30
Matsumoto Kotaro
89946ebc07 graphics: make N a transient usage-hints bitmask
Change the graphics protocol N key from a boolean into a usage-hints
bitmask. Define the first bit as a transient hint, allowing the terminal
to treat the image data as short-lived and apply optimizations such as
skipping disk cache writes.

Propagate the transient hint through frame coalescing and composition, so
a composed frame is transient if any contributing frame is transient.
2026-06-19 13:22:01 +09:00
Matsumoto Kotaro
cc2d7a1789 graphics: add memory-only storage for graphics data
Add a new graphics protocol key, N=1, to request that transmitted
image/frame data is kept only in memory and not written to the graphics
disk cache file.

This is useful for transient high-frequency updates such as video-like
streams, where the latest frame is the only useful data and persisting
each frame to the disk cache causes unnecessary write traffic.

The implementation keeps the existing graphics cache abstraction intact:
memory-only entries can still be read back by animation, composition, and
frame coalescing paths. Only persistence to the disk cache file is skipped.

The default behavior is unchanged when N is omitted or set to zero.
2026-05-30 18:46:24 +09:00
Kovid Goyal
5fd06628be
Note that nvim now supports the kitty graphics protocol 2026-04-27 06:43:49 +05:30
Steven Xu
dbce70908b docs: add *BICat* to graphics protocol applications 2026-04-18 01:06:16 +10:00
Kovid Goyal
4e76c089d8
Add emacs kitty graphics package to integrations 2026-03-03 09:19:18 +05:30
Kovid Goyal
941e85a95e
Note that graphics-protocol is now supported in xterm.js 2026-02-24 08:55:40 +05:30
shfc
51a08d23cd
fix: typos in documentation 2025-12-14 22:42:24 +10:30
Kovid Goyal
270d3ed656
Note that iTerm2 also added support for the kitty graphics protocol 2025-12-04 22:32:52 +05:30
Kovid Goyal
914631b049
Avoid malloc per chunk 2025-11-24 17:39:19 +05:30
Kovid Goyal
c9c1b20cd1
Code golf the python version as well 2025-11-24 15:50:51 +05:30
Kovid Goyal
a2636f1860
Code golf 2025-11-24 15:21:18 +05:30
Kovid Goyal
adf03c067c
Add support for OpenBSD as well to transmit_png 2025-11-24 15:08:55 +05:30
Kovid Goyal
1236f04a97
return rather than exit 2025-11-24 11:29:17 +05:30
Kovid Goyal
79cd4d3ee8
... 2025-11-24 11:28:27 +05:30
Kovid Goyal
701d229139
Dont depend on icat to read screen size in pixels 2025-11-24 10:52:53 +05:30
Kovid Goyal
9fdebd66cb
Minor robustness improvements 2025-11-24 10:22:36 +05:30
Kovid Goyal
905e72baa2
... 2025-11-24 10:20:58 +05:30
Kovid Goyal
a3777694fd
POSIX printf doesnt support \e 2025-11-24 10:18:43 +05:30
Kovid Goyal
0d78490cc8
Make the script to transmit PNG image POSIX sh compliant
Fixes #9243
2025-11-24 10:14:34 +05:30
Kovid Goyal
554859cc6e
... 2025-11-24 09:38:25 +05:30
Kovid Goyal
18e73d0cff
Make the example script to read screen geometry work on POSIX sh 2025-11-24 09:31:52 +05:30
Jesse Miller
9e9af32a07 Add 'blackcat' a modern compatible cat with image support 2025-09-12 19:23:34 -06:00
Kovid Goyal
9700a96f02
... 2025-07-13 07:37:47 +05:30
Kovid Goyal
01dacf0ef6
Fix #8756 2025-06-27 08:15:48 +05:30
Kovid Goyal
a023a0db09
Graphics protocol: Add a note clarifying image update behavior on re-transmission
See #8701
2025-06-03 07:41:21 +05:30
Kovid Goyal
fe391bf2ac
Add a note about CSI 16 t as well 2025-06-03 07:35:01 +05:30
Eva
3d00a26840
Update graphics-protocol.rst: typo fix 2025-04-29 00:09:04 +03:00