[Bug] cover is low res on tmux
I know this is probably on tmux side, but when using kew on tmux all album cover are displayed low res like this
is there a known workaround?
A terminal needs sixel support to enable images to look as they should.
tmux officially supports sixel when compiled with ./configure --enable-sixel
There are other terminals which support it as well. Listed here: https://www.arewesixelyet.com/
correct me if I'm wrong, but shouldn't sixel be already supported if this command succede?
Yeah it should! kew uses chafa to display images, so it might be related to how chafa handles tmux.
I got various bugs regarding the covers when using different terminals with tmux.
What is the terminal you are using tmux with?
thank you for the insight! I'm using foot
@hpjansson Do you perhaps know what's going on here?
can confirm that's some interaction between tmux on foot and chafa, top command was executed in tmux, bottom on bare foot (pun intended)
@hpjansson Do you perhaps know what's going on here?
I think so. tmux sixel support was merged in 3.4, so we can't enable it unconditionally everywhere. I added code in https://github.com/hpjansson/chafa/issues/217 to detect the version and enable it conditionally - this will be in the next release, probably fixing this issue.
Release done: https://github.com/hpjansson/chafa/releases/tag/1.14.5
Share and enjoy!
Release done: https://github.com/hpjansson/chafa/releases/tag/1.14.5
Share and enjoy!
thank you for your work hpjansson, but unfortunately I still get a broken image
@hpjansson just to clear my mind, is this problem related to the tmux upstream sixel's management?
@hpjansson just to clear my mind, is this problem related to the tmux upstream sixel's management?
Probably not - or at least it's not related to the linked issue. There are a number of reasons why detection can fail - I think it'd be wise to revisit this when Chafa 1.16 has been released and kew is updated to use its new features.
I'm having what appears to be a similar issue to the OP on my Mac.
I'm using iTerm2 (3.5.11) which has sixel support. Chafa version 1.14.5
Running both chafa and img2sixel directly on the album art works correctly, but the player does not seem to detect sixel support.
Chafa 1.16 is out. I simplified the detection API a bit. You can now do this:
https://github.com/hpjansson/chafa/blob/9ac25a52237f2bf5fbb82a9a3f7fbe3e7007f470/examples/adaptive.c#L39-L54
But I haven't added active probing to the public API yet, since it needs more testing and polish.
Nice. Is there a way to only do that if it's the correct chafa version?
EDIT: Found it.
@hpjansson I'm on last chafa and tmux master and I can correctly display images with chafa on sixel-enabled tmux on foot, and I can confirm this this is fixed
@ravachol if help is needed kew side, I'm available to test
thank you both for working this out, really awesome <3
having the same issue in foot, with no tmux
Then it's not the same issue, this is about tmux. Please make a new issue.
just wanted to double check, as OP is also using foot below tmux, that the issue wasnàt related to some underlying foot issue rather than tmux. Opening a new issue up in a jif
just hop in to confirm you that I do not face problems with kew covers on foot outside tmux
ok, thanks.
@amigthea Thank you for being available for testing, I'll take you up on that offer ;) And I'll let you know when we are ready.
@amigthea I've made some changes. Do you want to try if this now works (foot + tmux)?
It doesn't quite work for me in foot+tmux only in kitty+tmux, but then it doesn't work even with just running chafa test.jpg, which works for you, so maybe it will work for you:
git clone https://github.com/ravachol/kew.git cd kew make -j4 tmux ./kew
unfortunately not, this is what I'm seeing with the https://github.com/ravachol/kew.git build
and this with the latest release
ok, thanks. Seems that the passthrough logic for tmux only works in kitty so far.
what happens if you run: tmux set-option allow-passthrough on
before starting kew?
same as if I didn't, but if you can please double check because I'm running tmux as root with a bunch of config customization that makes possible to interact with the standard user environment, as in the case of kew. I'm careful to exclude this variables from the tests but I give myself some benefit of doubt that I maybe be doing something wrong 😅
Ideally it should just work, whatever you are doing.
@amigthea, I have now changed it so that chafa always uses sixels in tmux. There is no other way to get it working in foot I'm afraid. It's in main repository.
thank you @ravachol , the main branch build is working now. I'm gonna close this for now, do not hesitate to reopen it if a better solution pops up in the future, I'll make sure to be available for more test.
Keep it up ♥️