View Single Post
Old 11-13-2013, 10:42 AM   #16
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by sergeyvl12 View Post
Code:
lipc-wait-event -m com.lab126.powerd goingToScreenSaver,outOfScreenSaver
doesn't work for me because I turn off the screen saver during my program execution:

Code:
# prevent screensaver activation
lipc-set-prop com.lab126.powerd preventScreenSaver 1
...
# restore screensaver
lipc-set-prop com.lab126.powerd preventScreenSaver 0
I touch the screensaver timeout event now instead on a 500? seconds loop. leaves these events available. does the same job as far as the end user is concerned.


also. baf has provided a c based interface to lipc now.
https://github.com/bfabiszewski/openlipc
if you fancy refactoring that bit out.
twobob is offline   Reply With Quote