kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
250 stars 23 forks source link

Implement album cover widget #53

Open crocket opened 7 years ago

crocket commented 7 years ago

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.

kimtore commented 7 years ago

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.

crocket commented 7 years ago

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

tremby commented 7 years ago

How does that work?

crocket commented 7 years ago

I found

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

tremby commented 7 years ago

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 commented 7 years ago

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.

crocket commented 7 years ago

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.