[Nexus S General] Maximilian Mary:
#!/system/bin/sh

#

#

#

# DimmerMod Guide

#

# All credit for this mod goes to Ezekeel, who created it,

# and to the kernel devs (e.g. morfic, reddv1, and

# mathkid95) who have implemented it. If you're not

# rooted and using a kernel that supports it, such as

# Trinity, Lucid Nexus, or Matrix, don't ask why it

# doesn't work. If you don't know what I'm talking

# about, this might not be for you.

# Lines not preceded by a pound are commands that

# may be entered in terminal emulator. If you get a

# "directory nonexistent" error, your kernel does not

# support this. If you're familiar with init.d scripts, you

# know what to do.

#

#

#

# Screen Dimmer

# Screen dimmer will turn the screen off at the

# specified interval. Touching the screen will turn it

# back on. It does not play nicely with movies or other

# things that should keep the screen awake, but does

# allow the system and running apps to continue

# running, which shortens battery life. It has been

# made obsolete by touch wake dimmer. Use that

# instead.

#

# Enable:

echo 1 > /sys/class/misc/screendimmer/enabled

#

# Disable:

echo 0 > /sys/class/misc/screendimmer/enabled

#

# Set screen time-out delay,

# in milliseconds (example: 25 seconds). Value of 0 =

# indefinite delay (not useful for screen dimmer).

echo 25000 > /sys/class/misc/screendimmer/delay

#

#

#

# Touchkey Backlight Dimmer

# Touchkey backlight dimmer turns off the softkey

# backlight at the specified interval. It will turn back

# on (temporarily) when you touch the menu buttons.

# The battery savings are negligible. It is more of a

# user experience tweak. Some people prefer the way

# the phone looks with them off, particularly when

# watching movies. It can also be useful for bln users,

# who may prefer the keys to light up only when there

# is a notification.

#

# Disable:

echo 0 > /sys/class/misc/backlightdimmer/enabled

#

# Enable:

echo 1 > /sys/class/misc/backlightdimmer/enabled

#

# Set backlight dimmer time-out delay,

# in milliseconds (example: 3 seconds). Value of 0 =

# indefinite delay (not useful for backlight dimmer).

echo 3000 > /sys/class/misc/backlightdimmer/delay

#

#

#

# Touch Wake

# Touch wake will keep the touch input and menu

# softkeys active for the specified delay. The screen

# timeout will work normally, but you can then wake

# the phone by touching the screen or menu buttons

# instead of the power button. If you press the power

# button (or the touch wake expires) the phone will

# then be woken only by the power button, like normal.

# If you're running CyanogenMod, you can prevent the

# lockscreen from displaying when using touch-to-wake.

# Just set CyanogenMod settings->Lockscreen->Delay

# and timeout->Screen timeout delay to the same

# interval as touchwake/delay.

#

# Disable:

echo 0 > /sys/class/misc/touchwake/enabled

#

# Enable:

echo 1 > /sys/class/misc/touchwake/enabled

#

# Set touch wake time-out delay,

# in milliseconds (example: 5 minutes). Value of 0 =

# indefinite delay (If you do this, touch wake will stay

# active indefinitely. Press the power button to disable

# it when you put the phone in your pocket.)

echo 300000 > /sys/class/misc/touchwake/delay

#

#

#

# This guide brought to you by Maximilian Mary.