[PyKDE] idle time detection

Matt Newell newellm at blur.com
Thu Nov 9 20:20:53 GMT 2006


On Thursday 09 November 2006 11:48, Andreas Pakulat wrote:
> On 09.11.06 19:51:11, Sebastian Kügler wrote:
> > Can anyone think of some clean way for a PyKDE application to detect idle
> > time?
> >
> > For the Kubuntu powermanager applet, we're currently missing that
> > feature. The usecase would be kicking in a suspend / hibernate / dimming
> > display after N seconds of no mouse or keyboard activity.
>
> You have to hook into X11 then, I think.

You need to use the XScreenSaver extension.  Attached is a c++ class used by 
older psi that i use in one of my projects.  I'm not sure but you can 
probably achieve the same thing with pure python.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idle.h
Type: text/x-c++hdr
Size: 1326 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061109/1c587b4a/idle.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idle_x11.cpp
Type: text/x-c++src
Size: 2177 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061109/1c587b4a/idle_x11.bin


More information about the PyQt mailing list