-
Notifications
You must be signed in to change notification settings - Fork 65
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
Sixel capability not detected in foot + tmux #228
Comments
Hi, thanks for filing the issue. Could you please run the following: for i in TERM TERM_PROGRAM TERM_PROGRAM_VERSION TMUX; do echo $i=$(printenv $i); done ...both outside and inside tmux, and paste the output here? The name and version of your terminal emulator would also be helpful. |
with pleasure: the terminal emulator is
inside tmux
outside tmux
|
Thanks. Here's the explanation for what you're seeing: If we send sixels to tmux and the outer terminal does not support it, it'll just show a blank placeholder. Therefore we have to be sure the outer terminal can handle it. Unfortunately, foot does not export any environment variables apart from The only workaround currently is to invoke the Chafa CLI tool with I'm looking at two ways to work around this in the library:
It may be a good idea to implement both. |
Maybe your tmux was built without echo -e "\033[c";cat What does it say? |
Ok. The 4 means it has sixel support. Last thing to try: chafa -f sixel -s 5 <image.jpg> This makes the image tiny. tmux has an upper limit on the image data it will permit, and it's set fairly low. |
Unfortunately not. It's restricted by the maximum size of the input buffer, which is hardcoded at the moment: https://github.com/tmux/tmux/blob/46f384665965dd279754915772d3d86245b48784/input.c#L96 I don't know if the tmux maintainer is open to increasing it or making it configurable. You could ask, but be aware there are previous reports where users hit the limit, e.g. tmux/tmux#3726. There are ways we could work around this in Chafa (e.g. quantizing the image until it's below the limit, or splitting it into multiple sixel images), but it's bound to be somewhat brittle and requires a significant work investment from us. |
thank you for the insight, really appreciated beside image dimension, I'm gonna explicitly use |
in the meantime
exciting news on this!
the previously working something in the latest git version seems to mess up the preview I think? |
Woo! Thanks for raising the issue.
Yes, I've been reworking the TE identification code to be more flexible and manageable. That's good for the long term, but in the short term it's caused a few regressions. Thankfully we have a great QA department, so this will be fixed shortly. Does it work if you add |
unfortunately not, I noticed that with this argument it does not even flash the image |
Dumb question, but did you build tmux with |
no dumb question when the dumb is myself, forgot to build the master with |
Progress report: Current master should obviate the need for |
I get a pixelated image using chafa on tmux
There's no problem outside tmux
can you replicate? there' s something else I can try to workaround this?
chafa --version
The text was updated successfully, but these errors were encountered: