Le 23 octobre 2012 à 20:19 CEST, Yuri D'Elia a écrit : > The best way on X11 would be to use the XScreenSaverQueryInfo call. > I could bake an executable to return this value, but forking a new > process at each manage event seems prohibitive. > > I'm wondering if there's interest in integrating such a call in awesome.
I needed the exact same thing for a little project (logging the active window to make stats about which programs I use the most and my procrastination patterns :)). I ended writing a very little lib in C that queries XScreenSaver using XCB. I'm using Swig to generate Lua bindings (because I'm too lazy to do it myself) and have a module I can load in awesome. The code is here: https://github.com/Schnouki/dotfiles/commit/e52078de3bb371cfc84868c89f596d777dbceede Feel free to use it if it can help you. Regards, -- Thomas/Schnouki
pgp7aHgMQqHnO.pgp
Description: PGP signature
