Welcome, Guest. Please login or register.
July 30, 2010, 04:05:00 AM

Login with username, password and session length
Forum has been upgraded to SMF 1.1.4. Report any problems via PM to Troy.
38469 Posts in 4595 Topics by 2510 Members
Latest Member: zdarkazn
Search:     Advanced search
+  OQO Talk
|-+  Operating Systems
| |-+  Linux (Moderators: sandydlc, stuartguthrie, Pappasan)
| | |-+  OLED Conservation
« previous next »
Pages: [1] Print
Author Topic: OLED Conservation  (Read 1036 times)
psych787
Full Member
***
Posts: 107


View Profile
« on: August 11, 2009, 08:33:19 AM »

In case there are more OLED OQOs, here is some pseudocode for a linux script to preserve those precious blue OLEDs.

Whenever the screen has not changed in more seconds than specified in $inactive_sensitivity, the screen is blanked. The idea is that the OQO continues to be usable as a tool for monitoring IRC, playing music, etc without leaving the screen on.

Code:
#!/bin/bash
renice 19 -p $$

delay=2
inactive_sensitivity=6000

start_blank=0

#old_screenshot=$(hash screenshot)

while true

sleep $delay

#new_screenshot=$(hash screenshot)

#if new_screenshot != old_screenshot then
#old_screenshot=$(hash screenshot)
pkill xlock
start_blank=0
sleep $inactive_sensitivity
else
start_blank=1

#if $(pgrep xlock)
else
#if $start_blank
xlock -mode blank -nolock &

#if !=$(pgrep xlock) & start_blank #if xlock died due to user input
start_blank=0
#old_screenshot=$(hash screenshot)
sleep $inactive_sensitivity

TODO: Think through any remaining logic problems.
Figure out how to take screenshot beneath xlock, and hash it.
Store and use PID to avoid sledgehammer pkills.
Provide a tray icon to switch on/off.
Use dim red monochrome rather than screen blanking (red LEDs last a *long* time).
« Last Edit: August 16, 2009, 08:25:12 PM by psych787 » Logged
psych787
Full Member
***
Posts: 107


View Profile
« Reply #1 on: August 29, 2009, 07:49:15 AM »

Does anyone actually care about this?
Logged
Pappasan
Global Moderator
Full Member
*****
Posts: 125


View Profile
« Reply #2 on: August 29, 2009, 02:42:10 PM »

psych,
I'm sure that there are people out there that find this useful.  It's just that there are so few OLED OQO's out there and then on top of that, OLED OQO's running Linux - it might seem that no one cares about it.  Plus there are many users of the forum that never even register to the site.  Please keep on posting up threads like this.  It's great information that will help the OQO user base.
Logged

02 1.5GHZ 120Gb XP Pro Sprint, 02 1.5GHZ 60Gb Vista Ult Sprint
psych787
Full Member
***
Posts: 107


View Profile
« Reply #3 on: August 29, 2009, 07:05:57 PM »

Of course I'm going to keep posting. However, there are a couple OLED users here and on oqoasis. If they were interested in this, I'd expect at least some discussion on it.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Design by 7dana.com

OQO is a registered trademark of OQO, Inc. of San Francisco, CA