Thanks 20h, i missed the part where xssstate.c was so here is what it could be
http://sprunge.us/UGaB On Sat, Dec 8, 2012 at 3:48 PM, Christoph Lohmann <2...@r-36.net> wrote: > Greetings. > > On Sat, 08 Dec 2012 21:48:52 +0100 Carlos Torres <vlaadbr...@gmail.com> > wrote: > > On Dec 8, 2012 10:10 AM, "Christoph Lohmann" <2...@r-36.net> wrote: > > > > > > Greetings. > > > > > > On Sat, 08 Dec 2012 16:05:52 +0100 Carlos Torres <vlaadbr...@gmail.com > > > > wrote: > > > > What about xss, http://woozle.org/~neale/src/xss.html it doesn't > poll. > > > > > > It seems to expose the same functions but in a more hideous way. It > is > > > using the possibility to register a screensaver instead of having > that > > > logic on your own in a more understandable way. > > > > Registration of a screensaver is the whole purpose of the mit screensaver > > extension. With it you avoid polling for idle and can manage it with > xset. > > Isn't this better and consumes less cpu. > > Now, with renaming xgetidle to xssstate[0] it’s possible to do all of > this in a script. It does not poll, it waits for the time requested by > the user. This may be used in other scenarios. The example script to in‐ > voke slock is now in the xssstate repository. > > > Sincerely, > > Christoph Lohmann > > [0] http://git.suckless.org/xssstate/ > > >