-
Notifications
You must be signed in to change notification settings - Fork 64
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
xterm sixel support not detected automatically #191
Comments
Oops, realized afterward that this was with chafa 1.12. Will test with 1.14 later. |
I think the situation is the same in 1.14. XTerm used to default to having sixel support turned off - you had to enable VT340 support in order to get it, and I couldn't find a way to passively detect when this was the case. It looks like newer XTerm has it turned on. Do you know in which version this was changed, and how old it is? |
On 24/02/08 11:17, Hans Petter Jansson wrote:
I think the situation is the same in 1.14. XTerm used to default to having sixel support turned off - you had to enable VT340 support in order to get it, and I couldn't find a way to passively detect when this was the case. It looks like newer XTerm has it turned on. Do you know in which version this was changed, and how old it is?
I had no idea it was turned on by default.
But there’s a very interesting detection mechanism in the lsix project,
which seems to check for a reply code of "4" to the vt220 escape
sequence (no, I don’t understand how it works)
```
# IS TERMINAL SIXEL CAPABLE? # Send Device Attributes
IFS=";?c" read -a REPLY -s -t 1 -d "c" -p $'\e[c' >&2
for code in "${REPLY[@]}"; do
if [[ $code == "4" ]]; then
hassixel=yup
break
fi
done
# YAFT is vt102 compatible, cannot respond to vt220 escape sequence.
if [[ "$TERM" == yaft* ]]; then hassixel=yeah; fi
```
Please note that this only works with bash, not in zsh (which may use
the POSIX `read` version without all those options).
|
Looks like I was wrong about XTerm enabling support by default. So the action item here is to implement active probing. I put some of the scaffolding in place in Chafa 1.14, so it may not be that far away. |
@hpjansson FYI, you can enable the graphics protocols in XTerm without "downgrading" to VT340 by setting the decGraphicsID resource. That's been an option since patch 357 if the logs are accurate. |
using xterm 384 with xterm -ti vt340
happening:
chafa picture.jpg return pictures in symbols.
chafa -f sixels picture.jpg returns pictures in sixels (perfect quality)
expected:
with "-f sixels", chafa should recognize sixels support and use sixels by default
The text was updated successfully, but these errors were encountered: