chafa icon indicating copy to clipboard operation
chafa copied to clipboard

Use sixels on Windows when available

Open johnd0e opened this issue 1 year ago • 3 comments

Latest Windows Terminal supports sixels output, and it works when I specify -f sixels option explicitly

Perhaps it would be better to use it by default.

johnd0e avatar Aug 30 '24 10:08 johnd0e

Yes - at least long term, that's how I'd like it. But we can't distinguish between older Windows Terminal and the newer versions with sixel support, so we should probably wait until more users have upgraded.

Do people generally keep Windows Terminal up to date?

hpjansson avatar Aug 31 '24 12:08 hpjansson

@hpjansson, the yazi developer seems to query the terminal for sixels support like so: (https://github.com/microsoft/terminal/discussions/17809#discussioncomment-10469993). I don't know if this is feasible for chafa though. Also, the current stable release doesn't support sixels, however the current preview release does. https://github.com/microsoft/terminal/releases

ykhan21 avatar Sep 05 '24 20:09 ykhan21

@hpjansson, the yazi developer seems to query the terminal for sixels support like so: (microsoft/terminal#17809 (comment)). I don't know if this is feasible for chafa though.

It is, I just have to get over my API anxiety and implement an async terminal handler.

hpjansson avatar Sep 05 '24 22:09 hpjansson

You could use the "Send Device Attributes" escape sequence to detect sixel support. For Reference see this document Edit: I just noticed this was basically already proposed, but you can still use the link I provided as a reference, since its the exact same thing

a-usr avatar Nov 27 '24 14:11 a-usr

Yep. Similar discussion in #191. Thanks.

hpjansson avatar Nov 27 '24 15:11 hpjansson