This script acts as a client for a MPD server and displays information about the current song being played through the org.freedesktop.Notifications DBus interface. By reusing (serializing/deserializing) the UID for the Notification window it guarantees the information will be displayed in the same window. By doing this, instead of using "pynotify" or the command line tool "notify-send", the script doesn't need to be run as a daemon, instead it should be called on a per command basis (like mpc). This is useful when the script is bound to keyboard shortcuts. It may execute any command supported by the mpd module and additionaly "toggle" and "info".
This also works as a module, exporting a simple to use API for interacting with MPD and displaying information on screen. It is also flexible, which means it won't force you to communicate with the notification window with dbus only, if libnotify or another notification spec is preferred, a simple implementation of the Notification class is all that's needed.
python >= 2.5
python-dbus an implementation of the Desktop Notifications Specification (e.g. notify-osd)
How to run it
Edgar Merino <donvodka at gmail dot com>