blob: 0b5e0db73b0ef749549a5e296e29f6233ee7f4c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh -
#
# $NetBSD: lid_switch,v 1.9 2010/12/31 09:33:10 jruoho Exp $
#
# Generic script for lid switch events.
#
# Arguments passed by powerd(8):
#
# device event
case "${2}" in
pressed)
# If you want to put the system into sleep when the lid
# is closed, see the sleep_button -script for examples.
#
wsconsctl -d -w backlight=0 >/dev/null
exit 0
;;
released)
wsconsctl -d -w backlight=1 >/dev/null
exit 0
;;
*)
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
exit 1
esac
|