Don't get me wrong, I love the UNIX way of thinking. Doing one thing and being good at it is a concept very dear to me, but there are some cases where it just doesn't make much sense to separate stuff. That is the reason why I integrated the song change notification into
mpdscribble instead of writing my own from scratch. There was a system already implemented with all the necessary hooks for me to display these notifications at the right time, and just because it is used to send song info to last.fm and other trackers, I didn't see any reason to create a separate program just for some notifications.
Now that the obligatory ergo sum for this was made, I'd like to show how you too can use this set up nice and easy.
mpd.. you are going to need it. I'll post my current configuration, just so we can get along really well.
mpdscribble + libnotify
Next up, you are going to need to patch mpdscribble with my libnotify patch. If you are running Arch Linux just type in the following:
git clone https://github.com/qqroach/mpdscribble-libnotify-git
sudo pacman -U *.pkg.tar.xz
If you are running a different distribution, download my patch directly from here and use it to compile mpdscribble from git, something like this:
git clone git://git.musicpd.org/master/mpdscribble.git
curl https://raw.githubusercontent.com/qqroach/mpdscribble-libnotify-git/master/mpdscribble-libnotify.patch -o mpdscribble-libnotify.patch
patch -Np1 -i mpdscribble-libnotify.patch
sudo make install
After all of that you will need to configure mpdscribble too, the new important part is going to be
musicdir, this should be the same as
musicdir = /home/qqroach/Music
host = /home/qqroach/.mpd/mpd.socket
As a small note, I think it is worth to mention that yes, just like on the screenshot, cover art display is supported, but for it to display anything you need to know what it needs to display, and that is
cover-small.jpg in the same folder the music file is.
My specification for
cover-small.jpg is the following: a 100x100px JPEG compressed image file or as close to the dimensions as possible. The reason for this is to avoid the CPU overhead caused by libnotify scaling down the original sized cover art.
All done, enjoy!