maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Let screen lit while slide open (https://talk.maemo.org/showthread.php?t=46939)

dhcmega 2010-03-09 17:11

Let screen lit while slide open
 
Hi
Is it possible to let the screen always on while the slide is open and return to normal configured screen time out while slide screen is close?
Thanks

dhcmega

xomm 2010-03-11 01:55

Re: Let screen lit while slide open
 
No, not that I know of. You could try writing your own script.

An alternative is to use Simple Brightness Applet, and toggle "Keep display on."

dhcmega 2010-03-16 15:24

Re: Let screen lit while slide open
 
Yes, but I just want it to lit when it is opened, so I have to keep changing that config option all the time.

pelago 2010-03-17 10:18

Re: Let screen lit while slide open
 
This sounds like a good idea. It would be nice to be able to separately control timeouts whether the keyboard is open or closed.

nicolai 2010-03-17 14:06

Re: Let screen lit while slide open
 
You may try dbus-scripts.
Write a script to turn screen on every few seconds while
keybord open. And call this script from dbus-scripts when keyboard opened.

For example:
dbus-scripts setting:
/home/user/stay_lit.sh * * org.freedesktop.Hal.Device Condition ButtonPressed cover

Your script (/home/user/stay_lit.sh)

Code:

#!/bin/sh
# path to the keyboard slide state
SLIDE_PATH=/sys/devices/platform/gpio-switch/slide/state

TIMEOUT=25
read SLIDE_STATE < $SLIDE_PATH
while [ "$SLIDE_STATE" == "open" ]; do
# dbus-call to stop display blanking, I thought this one should turn light on
# for at least 60 seconds, but it depends on your display settings.
  run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_display_blanking_pause
  sleep $TIMEOUT
  read SLIDE_STATE < $SLIDE_PATH
done

The TIMEOUT value has to be less than your display blank time.

regards nicolai


All times are GMT. The time now is 05:00.

vBulletin® Version 3.8.8