mpd-status - print song details

mpd-status is a simple Go program that queries the music player daemon and prints out the status for use with tmux .

You need to have Go installed, clone the repo and run go build to create the binary.

By default the output is the status (using unicode play/pause/stop characters), the artist name, and song title. Pass --volume to include the volume level from 0-100%, and --elapsed to output the elapsed time and duration, like 2m40s/3m43s.

It will truncate the artist + song title to make sure the output fits into the width set by passing --width to it. The default is set to 40 characters.

You can add the output from mpd-status to the Tmux status line by putting this into your ~/.tmux.conf file:

set -g status-right "#[fg=green]#(~/bin/mpd-status)#[fg=default] | [#H] %H:%M %e-%b-%g"