pms icon indicating copy to clipboard operation
pms copied to clipboard

Implement album cover widget

Open crocket opened this issue 7 years ago • 7 comments

I love album covers because they look beautiful and make it easy to differentiate songs. I have yet to set up mpd, and I want to know if pms supports showing album cover images.

crocket avatar May 03 '17 16:05 crocket

Hi @crocket, Short answer: no. PMS is a console application. If you run your terminal with a big enough resolution, it should be feasible to render album art using jp2a or a similar application. Not sure how beautiful it would be, though.

kimtore avatar May 03 '17 16:05 kimtore

As far as I know, ncurses applications can draw 24-bit images directly on graphical terminal emulators. Ncmpcpp seems capable of this.

crocket avatar May 03 '17 23:05 crocket

How does that work?

tremby avatar Aug 07 '17 05:08 tremby

I found

  • https://www.reddit.com/r/unixporn/comments/4j562z/make_ncmpcpp_display_album_art/
  • https://gist.github.com/vlevit/4588882/

ranger, a console file manager, has image preview as well.

crocket avatar Aug 08 '17 00:08 crocket

OK. Weird. Yeah, works on my urxvt. Though the areas of the terminal the cover art doesn't cover lose my regular transparent black background colour, which is a shame.

Is this just a urxvt thing, or how many terminals support this?

For me, works in urxvt, but doesn't in terminator, gnome-terminal, xterm, st.

tremby avatar Aug 08 '17 00:08 tremby

Honestly, though, this seems like the kind of thing best deferred to external scripts, since availability obviously depends heavily on the environment. If/when #69 is implemented there could be a hotkey to run a script such as this. Or you could already run something like this (disclaimer: that's my fork of a thing) to show album in a graphical popup whenever the song changes.

tremby avatar Aug 08 '17 01:08 tremby

urxvt rendering method is supported only by urxvt.

w3mimgdisplay supports urxvt and partially supports st and other terminals. w3mimgdisplay leads to flickers in st. Thus, I have to refresh the terminal often.

A promising rendering method is SIXEL which st could support in the near future.

crocket avatar Aug 08 '17 03:08 crocket