mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #122] feature request: sixel support #51
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @justchokingaround on GitHub (Feb 7, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/122
Currently
spotify-player(which is amazing, I daily drive it tysm) supports the iTerm2 and Kitty image protocols. It would be great to also have sixel support, which is available on more terminal emulators. Here's a (maybe) useful ressource, for implementing this https://github.com/Siriusmart/youtube-tui/blob/master/src/items/iteminfo.rs@aome510 commented on GitHub (Feb 7, 2023):
Hi @justchokingaround, ty for your interest in this project. The library I use to implement image rendering already supports
sixel(behind a feature flag), so addingsixelsupport should not be too difficult.Also thanks for the example implementation, I'll take a look when implementing the support later.
@justchokingaround commented on GitHub (Feb 7, 2023):
thx :)
@aome510 commented on GitHub (Feb 15, 2023):
@justchokingaround can you build the app in https://github.com/aome510/spotify-player/pull/134 and try to run the terminal with
sixelsupport [1] to see if the new changes work? I couldn't test it as I don't have access to such terminals.[1]: please note that the list of supported terminals is actually limited by
viuerlibrary:github.com/atanunq/viuer@dc81f44a97/src/printer/sixel.rs (L83-L95)but I still think the list can be expanded by making a PR on
viuerrepo.@justchokingaround commented on GitHub (Feb 15, 2023):
this is using the foot terminal
@aome510 commented on GitHub (Feb 15, 2023):
This doesn't look like running with
imagefeature. Did you runcargo run --features image?@justchokingaround commented on GitHub (Feb 15, 2023):
no, i forgot about the flag, sorry

@aome510 commented on GitHub (Feb 15, 2023):
Thanks, now it looks really weird =))). I'll try to install foot today and test it.
@aome510 commented on GitHub (Feb 15, 2023):
@justchokingaround can you try it again with the new changes? After adding some custom scaling, it seems to work now on my
footterminal. By any chance, do you have other terminals that also supportsixel? I'm unsure if this scaling issue is because offootor theviuerlibrary's implementation ofsixel.@justchokingaround commented on GitHub (Feb 15, 2023):
here is foot after pulling latest changes (doesn't work properly):

yes, i do (list of terminal that support sixel: https://www.reddit.com/r/linux/comments/t3m7zm/quick_roundup_of_bitmap_graphics_availability_in/ )
here is wezterm (might be using the kitty protocol):

here is xterm (doesn't work properly):

here is alacritty with sixel patch (doesn't work properly):

in alacritty viu seems to be rendering blocks for images, but it works fine in term
viu in patched alacritty:

viu in foot:

an alternative rust program, which will soon be also made into a rust library (i've talked with the creator) is pic: https://github.com/emsquid/pic
here's an example of it in patched alacritty:

and in foot:

it supports width, height, position args etc
it might probably be tedious at this point to switch over to it for displaying images, but i'm just sharing what i know in case that might be helpful
@aome510 commented on GitHub (Feb 15, 2023):
@justchokingaround oh I forgot to tell you that about the different feature for
sixel, so you should runcargo run --features sixelinstead of--features image. Tysm for all the experiments, can you try again and update the images?@justchokingaround commented on GitHub (Feb 15, 2023):
np

here is foot:
here is wezterm:

and here is patched alacritty lol:

height and width variables are unused:

@aome510 commented on GitHub (Feb 15, 2023):
Look like the scaling works differently in my terminal compared with yours. Can you experiment with the
cover_img_scaleconfig option to see if setting it to different values works for you?FYI, setting
cover_img_scale=1.8kinda did the job for me with thefootterminal.Edit: you'll need to
git pullto see the new changes.@sewnie commented on GitHub (Feb 17, 2023):
needs
libsixellibrary to be installed because spotify_player will dynamically link to it 😔@sewnie commented on GitHub (Feb 17, 2023):
heres how it looks for me on
st, the black borders are astsixel bug, so it seems to be working fine. i would appreciate acover_img_spacing, to prevent the characters on the left, and on the right (paused/play icon) from being destroyed.@aome510 commented on GitHub (Feb 18, 2023):
Yeah, you need
libsixelforsixelto work.Interesting, does reduce the
cover_img_scalevariable help?@sewnie commented on GitHub (Feb 18, 2023):
no matter what, the border characters on the left would always get overridden.
@aome510 commented on GitHub (Feb 18, 2023):
Should be resolved by #134
@sewnie commented on GitHub (Feb 21, 2023):
can someone here and @maya-doshi (sorry for unnecessary ping, just need help from another sixel user) report of Xorg's cpu usage over long periods of time of using spotify-player with sixel? after some time Xorg has alot of cpu usage and memory usage, but not immediately.
i am on st, and this may not be a problem on other terminals which is my question.
@sewnie commented on GitHub (Feb 21, 2023):
no it's fine, you can just tell me if the sixel feature doesn't affect performance, I cannot tell if this is a libsixel or viuer issue.
@maya-doshi commented on GitHub (Feb 21, 2023):
There is no noticeable or significant impact on performance in my experience