Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/powerd/scripts save backlight level and turn it off on l...
details: https://anonhg.NetBSD.org/src/rev/4c55f5dce39b
branches: trunk
changeset: 757692:4c55f5dce39b
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Sep 14 04:37:04 2010 +0000
description:
save backlight level and turn it off on lid close, restore on lid open
diffstat:
etc/powerd/scripts/lid_switch | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 7542b253e178 -r 4c55f5dce39b etc/powerd/scripts/lid_switch
--- a/etc/powerd/scripts/lid_switch Tue Sep 14 02:45:25 2010 +0000
+++ b/etc/powerd/scripts/lid_switch Tue Sep 14 04:37:04 2010 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: lid_switch,v 1.5 2008/06/20 02:38:00 jmcneill Exp $
+# $NetBSD: lid_switch,v 1.6 2010/09/14 04:37:04 macallan Exp $
#
# Generic script for lid switch events. We try to put the system to sleep.
#
@@ -15,9 +15,15 @@
#else
# /usr/sbin/apm -d -S
#fi
+ wsconsctl -d backlight >/tmp/backlight
+ wsconsctl -d -w backlight=0 >/dev/null
exit 0
;;
released)
+ if [ -f "/tmp/backlight" ]; then
+ wsconsctl -d -w `cat /tmp/backlight`
+ fi
+ exit 0
;;
*)
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
Home |
Main Index |
Thread Index |
Old Index