Repository navigation
terminal(feat[sixel]): Add stateful XTSMGRAPHICS (#28) - #55
Merged
Merged
Conversation
tony
force-pushed
the
feat/kitty-alt-assoc-keys
branch
from
November 28, 2026 20:14
eeea3c5 to
9bd371d
Compare
why: Host terminals differ on whether XTSMGRAPHICS (CSI ? Pi ; Pa ; Pv S) is ignored, read-only, or supports pixel-geometry queries and register writes alongside SIXEL DA1 (;4) advertisement. what: - Add xtsmgraphics_enabled, xtsmgraphics_geometry_enabled, xtsmgraphics_set_enabled, sixel_color_registers, and max_sixel_color_registers to QueryBehavior with bounds validation - Configure GHOSTTY_PROFILE, KITTY_PROFILE, LINUX_CONSOLE_PROFILE, XTERM_PROFILE (DA1 ;4), and tmux_profile(sixel=...) accordingly
why: Applications probing SIXEL support via CSI ? Pi ; Pa ; Pv S expect stateful color-register and pixel-geometry read, reset, set, and maximum responses gated on graphics tracking and profile capabilities. what: - Implement stateful XTSMGRAPHICS (Pi=1 color registers, Pi=2 geometry, Pa=1..4, Ps=0..3) in Terminal._csi_private_q_S, resetting on RIS and reporting ;3S when Policy.track_graphics is False - Decode CSI ? ... S as XTSMGRAPHICS in libvt.codec.explain - Add tests, doctests, and changelog documentation
tony
force-pushed
the
feat/stateful-xtsmgraphics
branch
from
November 28, 2026 20:17
d0e040f to
7b23a31
Compare
21 of 28 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28 (depends on #54)
Summary
Implements stateful
XTSMGRAPHICS(CSI ? Pi ; Pa ; Pv S)SIXELcolor-register (Pi = 1) and pixel-geometry (Pi = 2) read, reset, set, and maximum queries (Pa = 1..4) acrossQueryBehavior, host profiles,Terminal, andlibvt.codec.explain().What changed
libvt.config.QueryBehavior,libvt.profiles, andlibvt.contrib.tmux.profile.tmux_profile: addxtsmgraphics_enabled,xtsmgraphics_geometry_enabled,xtsmgraphics_set_enabled,sixel_color_registers(256), andmax_sixel_color_registers(1024), advertise;4inXTERM_PROFILE.identity.da1, disableXTSMGRAPHICSonGHOSTTY_PROFILE/KITTY_PROFILE/LINUX_CONSOLE_PROFILE, and configuretmux_profile(sixel=True)with1024read-only color registers and disabled geometry/writes.libvt.terminal.Terminal&libvt.codec: track liveSIXELcolor registers and geometry overrides acrossPa = 1..4(Ps = 0ok,Ps = 1unrecognizedPi,Ps = 2unrecognizedPa,Ps = 3disabled/untracked or missing cell dimensions), gate responses onPolicy.track_graphicsandPolicy.emit_replies, reset registers onRIS, and labelCSI ? ... SasXTSMGRAPHICSinexplain().tests/test_terminal.py,docs/topics/protocols-and-input.md, andCHANGES: unit tests, doctests, and documentation.