An application to display the albumn cover of the track played in cmus.
Go 100.0%
7 1 0

Clone this repository

https://tangled.org/mgabarda.com/cover-viewer https://tangled.org/did:plc:leadkratzafsoun4byj6rp6s/cover-viewer
git@tangled.org:mgabarda.com/cover-viewer git@tangled.org:did:plc:leadkratzafsoun4byj6rp6s/cover-viewer

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

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:

screenshot

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