Well, I hadn't done that before, but it was pretty painless. Perhaps someone could take a look and verify that I truly am a l33t w1k1 h4x0r.
Yep, sems good from here :-) And all in one edit, too!
Next trick for you - how cool would it be to hook all this up with OSD? (On Screen Display - a simple library that lets you float text directly onto the X display, useful for short messages like IM buddy status changes ...)
I'm using Gaim-OSD happily at the moment ... and I have a few other OSD goodies available ...
libxosd-dev X On-Screen Display library - development
libxosd2 X On-Screen Display library - runtime
osdclock Clock using the XOSD library
osdsh Overlays your screen with various system inf
python-osd Python bindings for X On-Screen Display libr
#!/bin/bash
ARTIST=$(echo "query artist" | nc -w 2 -q 1 192.168.2.20 9232 | grep "info artist" |cut -c18- | tr -d "\r\n")
TITLE=$(echo "query title" | nc -w 2 -q 1 192.168.2.20 9232 | grep "info title" |cut -c17-)
osdctl -s "Now playing $TITLE by $ARTIST"
Wrap that up into a little loop that checks every 10 seconds or so, and only calls osdctl if the trackname has changed ... :-)
-jim
Here is my cheap and cheerful "nowplaying" script, which I use as my mail signature (when there's something actually playing).
I take it that there was nothing playing when you wrote your emails telling us about playing things? :-)
