mpdinfo

Created: 2014-05-19 00:09
Updated: 2015-01-09 04:01
License: lgpl-3.0
c

README.md

mpdinfo

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

Building 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

make

To install, run

make install

The default installation location is /usr/local/bin. To change this, edit the PREFIX variable in the Makefile.

Usage

Running 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 %

License

mpdinfo is licensed under the terms of the GNU GPLv3. See LICENSE for details.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more