Skip to content
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

I can't get the album art in Tmux #225

Open
acdcbyl opened this issue Feb 4, 2025 · 10 comments
Open

I can't get the album art in Tmux #225

acdcbyl opened this issue Feb 4, 2025 · 10 comments

Comments

@acdcbyl
Copy link

acdcbyl commented Feb 4, 2025

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.

@ravachol
Copy link
Owner

ravachol commented Feb 4, 2025

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

@acdcbyl
Copy link
Author

acdcbyl commented Feb 4, 2025

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

Thx!

@ravachol
Copy link
Owner

ravachol commented Feb 5, 2025

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
Copy link
Owner

ravachol commented Feb 5, 2025

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

@acdcbyl
Copy link
Author

acdcbyl commented Feb 5, 2025

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

@ravachol
Copy link
Owner

ravachol commented Feb 5, 2025

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

@hpjansson
Copy link
Contributor

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.

@ravachol
Copy link
Owner

ravachol commented Feb 5, 2025

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
Copy link
Owner

ravachol commented Feb 5, 2025

@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.

@acdcbyl
Copy link
Author

acdcbyl commented Feb 5, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants