mpdinfo is a simple utility that takes a format string as an argument and
prints out information about the current song mpd is playing.
Building and Installing
mpdinfo depends on a libmpdclient. This is probably available from
your distro's package manager; for instance, on Arch Linux, you can get it using
pacman -S libmpdclient
To build mpdinfo, simply run
To install, run
The default installation location is /usr/local/bin. To change this, edit the PREFIX variable in the Makefile.
mpdinfo -h should give you a pretty good idea of how to use
mpdinfo. For reference, running
mpdinfo -h prints out the following:
Usage: mpdinfo [-h] [format] Get information about the current status of mpd. Options: -h Show help. format is a string containing any of the following patterns: %n The name of the current song. %a The artist of the current song. %l The album title of the current song. %c The current time in the song. %r The amount of time remaining in the current song. %t The total time of the current song. %% Print out a literal '%' character. If format is not specified, it is assumed to be "%n - %a | %c/%t" Examples: $ mpdinfo E-Pro - Beck | 2:03/3:22 $ mpdinfo "%n - %a" E-Pro - Beck $ mpdinfo "%c / %t" 2:03 / 3:22 $ mpdinfo "%% %n %%" % E-Pro %
mpdinfo is licensed under the terms of the GNU GPLv3. See LICENSE for details.