Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 256-creg sixel output when DA1 advertises feature 4 #2253

Merged
merged 4 commits into from
Oct 9, 2021

Conversation

dankamongmen
Copy link
Owner

Even if we received no answers to our XTSMGRAPHICS queries (any replies here are preferred to this method, and will not be overridden), Sixel might still be supported. See @j4james's extensive list of software (and maybe hardware?) I've never heard of. If 4 is among the attributes listed in a DA1 response, that's a claim of Sixel support. For now, if we receive this in the absence of other Sixel info, enable Sixel with an assumption of 256 color registers.

Some of these will only support 16, but our crappy quantization algorithm doesn't support that anyway, so for now they get forcefed a palette of 256 colors like so many geese in a french foie gras shack.

if we crash while detecting kitty keyboard support, we
currently don't pop the keyboard state. since we set our
desired state before detecting support, this could leave
the terminal in an invalid state. now, we initialize
kbdlevel to UINT_MAX before detection, so that in a crash,
the pop always happens. we reset it at the end of
interrogation, assuming we didn't load it from a query
response. the downside is that a terminal which doesn't
consume this sequence will get hit with it in a crash, but
we're already crashing, so who cares? leaving the terminal
in an invalid state, however, is very annoying.
@dankamongmen dankamongmen merged commit 7088f4a into master Oct 9, 2021
@dankamongmen dankamongmen deleted the dankamongmen/sixelmania branch October 9, 2021 13:58
@j4james
Copy link

j4james commented Oct 10, 2021

FYI, I've tested this on VTE, MinTTY, and DomTerm, and they're all working now. Not fantastically, because none of them support transparency, but they are at least displaying images now. I'm still investigating issues on some of the other terminals.

@dankamongmen
Copy link
Owner Author

FYI, I've tested this on VTE, MinTTY, and DomTerm, and they're all working now. Not fantastically, because none of them support transparency, but they are at least displaying images now. I'm still investigating issues on some of the other terminals.

that's awesome. i assume they support opaque images perfectly (within quantization limits), then? w00t i'm glad you pushed for this!

@dankamongmen
Copy link
Owner Author

and thank you tremendously for doing all this testing, which quite frankly i doubt i would get to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants