[GH-ISSUE #660] Ghostty album cover image #1318

Open
opened 2026-03-14 14:22:33 +03:00 by kerem · 18 comments
Owner

Originally created by @5183nischal on GitHub (Jan 13, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/660

Is your feature already implemented in the latest master?
No

Is your feature request related to a problem? Please describe.
Ghostty terminal supports kitty graphics but the album cover is not rendered using it.

Describe the solution you'd like
Use kitty graphics protocol to display album cover.

Originally created by @5183nischal on GitHub (Jan 13, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/660 **Is your feature already implemented in the latest `master`?** No **Is your feature request related to a problem? Please describe.** Ghostty terminal supports kitty graphics but the album cover is not rendered using it. **Describe the solution you'd like** Use kitty graphics protocol to display album cover.
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

It is rendered for me using ghostty on x86 Linux with Wayland.. are you maybe using a multiplexer like tmux? That could interfere with spotify_player being able to detect the terminal

<!-- gh-comment-id:2594234368 --> @m4r1vs commented on GitHub (Jan 16, 2025): It is rendered for me using ghostty on x86 Linux with Wayland.. are you maybe using a multiplexer like tmux? That could interfere with spotify_player being able to detect the terminal
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Try running spotify_player (built with the image feature ofc) using ghostty -e spotify_player and see if it works now :)

<!-- gh-comment-id:2594235643 --> @m4r1vs commented on GitHub (Jan 16, 2025): Try running spotify_player (built with the image feature ofc) using `ghostty -e spotify_player` and see if it works now :)
Author
Owner

@5183nischal commented on GitHub (Jan 16, 2025):

Hi, thank you! Yes, tmux was the issue. Is there a way to get a proper rendering inside tmux? I didn't see anything in the docs.

<!-- gh-comment-id:2594655446 --> @5183nischal commented on GitHub (Jan 16, 2025): Hi, thank you! Yes, tmux was the issue. Is there a way to get a proper rendering inside tmux? I didn't see anything in the docs.
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Hmm, not sure if this is an issue with this project, tmux or ghostty. Do you know if it works with tmux in kitty terminal? If so, that indicates that it should be solved in ghostty or tmux.

However, some other apps like yazi work for me in tmux with ghostty so maybe this can be fixed in here directly.

Unfortunately, I have no experience whatsoever with the kitty protocol and have no idea how to check if it is available.
However, right now I am digging through the codebase a bit so if I find a solution, I'll post it here

<!-- gh-comment-id:2595182931 --> @m4r1vs commented on GitHub (Jan 16, 2025): Hmm, not sure if this is an issue with this project, tmux or ghostty. Do you know if it works with tmux in kitty terminal? If so, that indicates that it should be solved in ghostty or tmux. However, some other apps like yazi work for me in tmux with ghostty so maybe this can be fixed in here directly. Unfortunately, I have no experience whatsoever with the kitty protocol and have no idea how to check if it is available. However, right now I am digging through the codebase a bit so if I find a solution, I'll post it here
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Seems to be handled by https://github.com/atanunq/viuer

<!-- gh-comment-id:2595811549 --> @m4r1vs commented on GitHub (Jan 16, 2025): Seems to be handled by https://github.com/atanunq/viuer
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Maybe relevant: https://github.com/atanunq/viuer/issues/67

<!-- gh-comment-id:2595818248 --> @m4r1vs commented on GitHub (Jan 16, 2025): Maybe relevant: https://github.com/atanunq/viuer/issues/67
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

github.com/atanunq/viuer@f66fa7710e/src/printer/kitty.rs (L62)

<!-- gh-comment-id:2595830138 --> @m4r1vs commented on GitHub (Jan 16, 2025): https://github.com/atanunq/viuer/blob/f66fa7710ee82a2bfc03e259889445b797ac5709/src/printer/kitty.rs#L62
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

They check for "ghostty" in the "$TERM" environment variable. Maybe set it manually for now?

<!-- gh-comment-id:2595832127 --> @m4r1vs commented on GitHub (Jan 16, 2025): They check for "ghostty" in the "$TERM" environment variable. Maybe set it manually for now?
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Okay, when I do export TERM="xterm-ghostty", spotify_player won't start..

<!-- gh-comment-id:2595837780 --> @m4r1vs commented on GitHub (Jan 16, 2025): Okay, when I do `export TERM="xterm-ghostty"`, spotify_player won't start..
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Same for doing it through tmux and updating "TERM_PROGRAM"

<!-- gh-comment-id:2595864600 --> @m4r1vs commented on GitHub (Jan 16, 2025): Same for doing it through tmux and updating "TERM_PROGRAM"
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

I wonder how yazi (and image.nvim) do it...? I have

set -g allow-passthrough all
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM

in my tmux config but not quite sure what it does tbh

<!-- gh-comment-id:2595868276 --> @m4r1vs commented on GitHub (Jan 16, 2025): I wonder how yazi (and image.nvim) do it...? I have ``` set -g allow-passthrough all set -ga update-environment TERM set -ga update-environment TERM_PROGRAM ``` in my tmux config but not quite sure what it does tbh
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Just commented out these lines and yazi kitty still works lol

<!-- gh-comment-id:2595871024 --> @m4r1vs commented on GitHub (Jan 16, 2025): Just commented out these lines and yazi kitty still works lol
Author
Owner

@m4r1vs commented on GitHub (Jan 16, 2025):

Seems like this needs to be addressed in viuer because when we set the terminal to "xterm-ghostty" within tmux, viuer::get_kitty_support() blocks till infinity

<!-- gh-comment-id:2595933698 --> @m4r1vs commented on GitHub (Jan 16, 2025): Seems like this needs to be addressed in viuer because when we set the terminal to "xterm-ghostty" within tmux, `viuer::get_kitty_support()` blocks till infinity
Author
Owner

@rhodes-b commented on GitHub (Jan 19, 2025):

Hmm, not sure if this is an issue with this project, tmux or ghostty. Do you know if it works with tmux in kitty terminal? If so, that indicates that it should be solved in ghostty or tmux.

However, some other apps like yazi work for me in tmux with ghostty so maybe this can be fixed in here directly.

Unfortunately, I have no experience whatsoever with the kitty protocol and have no idea how to check if it is available. However, right now I am digging through the codebase a bit so if I find a solution, I'll post it here

There is a way to allow it to work in tmux etc as well, but both the terminal and program have to support this both kitty and ghostty support the pass-through not sure if the program does

https://sw.kovidgoyal.net/kitty/graphics-protocol/#unicode-placeholders

<!-- gh-comment-id:2600913196 --> @rhodes-b commented on GitHub (Jan 19, 2025): > Hmm, not sure if this is an issue with this project, tmux or ghostty. Do you know if it works with tmux in kitty terminal? If so, that indicates that it should be solved in ghostty or tmux. > > However, some other apps like yazi work for me in tmux with ghostty so maybe this can be fixed in here directly. > > Unfortunately, I have no experience whatsoever with the kitty protocol and have no idea how to check if it is available. However, right now I am digging through the codebase a bit so if I find a solution, I'll post it here There is a way to allow it to work in tmux etc as well, but both the terminal and program have to support this both kitty and ghostty support the pass-through not sure if the program does https://sw.kovidgoyal.net/kitty/graphics-protocol/#unicode-placeholders
Author
Owner

@artem-simutin commented on GitHub (Mar 2, 2025):

+1 Have the exact same issue with Ghostty + Tmux.
Detaching from Tmux helps.

Image

<!-- gh-comment-id:2692973115 --> @artem-simutin commented on GitHub (Mar 2, 2025): +1 Have the exact same issue with Ghostty + Tmux. Detaching from Tmux helps. ![Image](https://github.com/user-attachments/assets/af70b7e7-7976-4e32-8795-ff77933238d8)
Author
Owner

@gurdittcancode commented on GitHub (Apr 26, 2025):

@artem-simutin unrelated but can you share your ghostty theme? looks cool lol

<!-- gh-comment-id:2831987932 --> @gurdittcancode commented on GitHub (Apr 26, 2025): @artem-simutin unrelated but can you share your ghostty theme? looks cool lol
Author
Owner

@felixschmelzer commented on GitHub (Jun 28, 2025):

+1 it doesn’t work when using tmux. It does work in Ghost, iTerm, and Kitty, but it stops working as soon as I run it inside tmux, no matter which terminal emulator I use.

<!-- gh-comment-id:3015120807 --> @felixschmelzer commented on GitHub (Jun 28, 2025): +1 it doesn’t work when using tmux. It does work in Ghost, iTerm, and Kitty, but it stops working as soon as I run it inside tmux, no matter which terminal emulator I use.
Author
Owner

@qiUip commented on GitHub (Jul 19, 2025):

+1 Same issue. Works fine in kitty, looks like the above in kitty + tmux.

Thanks to @rhodes-b link, I think it might indeed be related to the unicode escape code - if that's the case I will try and play around with it and see if I can find a decent fix (I've never wrote any rust or used kitty's image protocol so not expecting to solve it, but it's worth a try).

<!-- gh-comment-id:3092394529 --> @qiUip commented on GitHub (Jul 19, 2025): +1 Same issue. Works fine in kitty, looks like the above in kitty + tmux. Thanks to @rhodes-b link, I think it might indeed be related to the unicode escape code - if that's the case I will try and play around with it and see if I can find a decent fix (I've never wrote any rust or used kitty's image protocol so not expecting to solve it, but it's worth a try).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1318
No description provided.