kew icon indicating copy to clipboard operation
kew copied to clipboard

I can't get the album art in Tmux

Open acdcbyl opened this issue 11 months ago • 14 comments

I used kitty+tmux,and chafa looks normal. chafa when I open the kew,everything will change: I lost my ablum art. kew besides,if i make set-titles on in .tmux.conf,when i open the Playlist View will send a strange string of gibberish to my bar and make my bar crash.

acdcbyl avatar Feb 04 '25 01:02 acdcbyl

Yeah I haven't even started with tmux and making sure kew works there. I will look into it,.

ravachol avatar Feb 04 '25 02:02 ravachol

Yeah I haven't even started with tmux and making sure kew works there. I will look into it,.

Thx!

acdcbyl avatar Feb 04 '25 02:02 acdcbyl

I think I found the culprit. Do you want to help me verify if it works now?

run: git clone https://github.com/ravachol/kew.git cd kew make -ij4 ./kew

and try it.

ravachol avatar Feb 05 '25 11:02 ravachol

oh, on kitty it still doesn't work for me. it says sixel image and then + signs.

ravachol avatar Feb 05 '25 11:02 ravachol

I think I found the culprit. Do you want to help me verify if it works now?

run: git clone https://github.com/ravachol/kew.git cd kew make -ij4 ./kew

and try it.

Of course, it's my pleasure. I verified it using your method and it seems it's still not working.

Image

acdcbyl avatar Feb 05 '25 11:02 acdcbyl

Thanks!

I prevented the image from scrolling up and disappearing on konsole terminal. So it seems to work there. It also seems to work on foot.

But on kitty it does not display the image. Maybe @hpjansson knows what the problem is. There were some recent developments with tmux and chafa.

This is how it looks for me in kitty+tmux:

Image

ravachol avatar Feb 05 '25 11:02 ravachol

Hey, happy to help here in any way I can.

The underlying issue is that tmux supports sixel graphics natively, while kitty does not. So tmux renders it using a placeholder there. A proper long-term fix is either for tmux to support kitty graphics, or kitty to support sixels, so they can have a common graphics protocol.

However, kitty also supports a passthrough hack repurposing Unicode code points for placements on the grid. Chafa also supports this, and newer versions of the CLI tool should prefer it over sixels in a kitty-tmux environment.

From kew's perspective - the 1.16 version of the Chafa C API is right around the corner now, and it takes care of the detection and setting canvas parameters for passthrough etc. for you. With the 1.14 API you may still be able to look for the CHAFA_TERM_SEQ_BEGIN_KITTY_IMMEDIATE_VIRT_IMAGE_V1 seq in the detected ChafaTermInfo, and if it's set, do the following:

  • Enable kitty graphics with chafa_canvas_config_set_pixel_mode().
  • Enable passthrough with chafa_canvas_config_set_passthrough(). Use CHAFA_PASSTHROUGH_SCREEN or CHAFA_PASSTHROUGH_TMUX depending on which of the CHAFA_TERM_SEQ_BEGIN_SCREEN_PASSTHROUGH and CHAFA_TERM_SEQ_BEGIN_TMUX_PASSTHROUGH seqs is supported by the ChafaTermInfo.

hpjansson avatar Feb 05 '25 12:02 hpjansson

Thank you! I really appreciate that I can ask you about these things. I think it's better to wait for chafa 1.16 then.

ravachol avatar Feb 05 '25 12:02 ravachol

@acdcbyl, maybe pressing b and using ascii images can be a temporary solution until the next chafa version comes out. It's not the same, but maybe more fun than nothing.

ravachol avatar Feb 05 '25 12:02 ravachol

Thank you very much! I appreciate the contributions you guys made and I'll be waiting for the next version.

acdcbyl avatar Feb 05 '25 12:02 acdcbyl

I have the same issue replicated on Konsole in Void.

Stalloevan avatar Mar 17 '25 15:03 Stalloevan

@Stalloevan, Your album art disappears? Is this with tmux?

ravachol avatar Mar 17 '25 15:03 ravachol

Not so much that it disappears, and more that it never appears. Just using default Konsole. This seems to be a distro specific issue, as it was working fine on Fedora KDE.

Stalloevan avatar Mar 17 '25 17:03 Stalloevan

Weird. Thanks for reporting this. It's a different issue, I'll make a new issue for it.

ravachol avatar Mar 17 '25 18:03 ravachol

@acdcbyl Chafa 1.16 has been released and I've made some changes. Do you want to try if this now works (kitty + tmux)?

git clone https://github.com/ravachol/kew.git cd kew make -j4 tmux ./kew

ravachol avatar May 28 '25 08:05 ravachol

Okay, but I still can't get the album art.

Image

acdcbyl avatar May 28 '25 08:05 acdcbyl

Okay, but I still can't get the album art.

Image

Oh, my chafa doesn't seem to be new, I went to try to pull the git package

acdcbyl avatar May 28 '25 08:05 acdcbyl

Oh yeah, you need the new chafa.

ravachol avatar May 28 '25 09:05 ravachol

I've used 1.16 but unfortunately it still doesn't show up

Image

acdcbyl avatar May 28 '25 09:05 acdcbyl

Hmm, and you did compile kew from source? and ran it with ./kew not kew?

ravachol avatar May 28 '25 09:05 ravachol

Oh, sorry! I'm an idiot, I restarted tmux and everything is fine now. Thank you very much for your work.♥️

acdcbyl avatar May 28 '25 09:05 acdcbyl

Nice...well I guess I'm closing this issue. Thank you for the help. Enjoy kew!

ravachol avatar May 28 '25 09:05 ravachol