View Single Post
Old 09-11-2013, 06:29 PM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by hemna View Post
Hello,
I'm trying to get my weather hack working only when the kindle is in sleep mode. I have a cron job that runs the weather update shell script.

Is there a way I can tell from the cmdln/bash when the kindle is sleeping? I don't want the weather shell script to display the weather png when I'm reading a book
Sure - Simple.

When the Kindle is sleeping, the CPU is halted, and anything software will not respond.
I.E: Like the command line shell.

And - the CPU may (can) go to sleep while you are reading a page of a book.
It is a meta-static display - it needs neither cpu nor power to continue to display the page.

A better solution -
Use dos1's event hooks to capture "going to screensaver" event and use that to start your weather display.
Similarly, capture the "coming out of screensaver" event to stop the weather display.
knc1 is offline   Reply With Quote