cmus Cover Viewer#
Small program in Go to display the cover art of the current track playing in cmus.
This is how it'd look in kitty terminal and using also cava, using kitty windows:
Installation#
go install tangled.org/mgabarda.com/cover-viewer@latest
Or build from source:
git clone git@tangled.org:mgabarda.com/cover-viewer
cd code-viewer/
go build
Usage#
This program has two modes: visualizer to show the cover, and notify to send the change in the cover.
Run visualizer#
The visualizer will be running, waiting to the events from cmus, dispatched using
cover-viewer --mode notify:
cover-viewer --mode visualizer
Currently this has been tested in kitty, but it should be compatible with all the terminal emulators supported by go-termning.
Notify from cmus#
This is based on the status display from cmus. The input is read from the stdin:
echo "file <path-to-file>" | cover-viewer --mode notify
Assuming you use multiple programs, with a shell
script, e.g. ~/.cmus/status_display_program.sh, you can add there this visualizer:
#!/bin/sh
# other programs
program1 "$@" &
program2 "$@" &
# cover viewer
echo "$@" | cover-viewer --mode notify