#!/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