Digging around a bunch of my old code I came across this and figured I'd put it on github and put the url here.
It's just the code I did years ago for Idle support in Spark for linux. NO idea what the current state of Spark is atm and this might have finally got pushed into the core of Spark.
It also contains the .cpp source to talk with X in case you were curious. heh
aka: cyclone (not sure why my account is locked as cyclone, but meh)