It turns out I don't like passing unnecessary values to functions anymore because things got changed around so I forked SDL to remove the deprecated flags from ConvertSurface, ConvertSurfaceFormat and CreateRGBFormat.

For example this..

newSurf = SDL_ConvertSurface(requestedSurf, m_pScrnSurf->format, NULL);

..just becomes simply:

newSurf = SDL_ConvertSurface(requestedSurf, m_pScrnSurf->format);

I guess I just got old enough so things like this started to bother me, well anyway, here is the patch for SDL:


And here are the patches for SDL_image and SDL_ttf:



#3The Expert

#2Mpdsribble with libnotify

A screenshot of the notification when using the libnotify patch for mpdscribble.

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.


Yeah, mpd.. you are going to need it. I'll post my current configuration, just so we can get along really well.


bind_to_address    "~/.mpd/mpd.socket"
music_directory "~/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/database"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/state"
sticker_file "~/.mpd/sticker.sql"

auto_update "yes"

audio_output {
type "pulse"
name "PulseAudio"

audio_output {
type "fifo"
name "FIFO"
format "44100:16:1"
path "~/.mpd/mpd.fifo"

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
cd 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
cd mpdscribble
curl https://raw.githubusercontent.com/qqroach/mpdscribble-libnotify-git/master/mpdscribble-libnotify.patch -o mpdscribble-libnotify.patch
patch -Np1 -i mpdscribble-libnotify.patch
./autogen.sh --prefix=/usr
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 music_directory in mpd.conf.


musicdir = /home/qqroach/Music
host = /home/qqroach/.mpd/mpd.socket


Cover Art

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!

#1Hello World!

This is it!

The thing we waited for so long!

Please allow me to introduce you to my blog, it hasn't been redesigned from the ground up, in fact, I didn't really change too much stuff since the last time I was actively maintaining it. The biggest change so far has been the post info box redesign and the complete removal of the responsive layout for mobiles. Leaving comments and registering still does not work, the game in the header mysteriously stopped working too and all my debugging attempts failed to shine light on the problem so I did what any responsible guy would do, deleted the whole thing.

But with all these issues aside, I think it is time to finally start collecting all the useful and useless knowledge I managed to accumulate over the years.