From Music Player Daemon Community Wiki
#!/bin/sh
# Display an OSD of the current track
COLOR="#495D94"
osd ()
{
title=`mpc | head -1 | sed 's/^volume: [0-9]*%.*/(nothing)/'`
position=`mpc | head -2 | tail -1 | sed 's/.*\(([0-9]*%)\)/\1/'`
"$title" == "(nothing)" && exit || echo "Playing:\n$title $position "
}
pid=`ps ax | grep osd_cat | sed '/grep/d' | awk '{print $1}'`
[ "$pid" ] && kill $pid
echo -e `osd` | \
osd_cat -f '-bitstream-charter-bold-r-*-*-*-250-*-*-*-*-*-*' \
-p bottom -o 15 -l 3 -A right -c "$COLOR" -s 1 -d 4