blob: 4b9110d3eecc62240ed2acad1b69b9c46ea491b7 (
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
#
# Copyright (C) 2006 Joe Marcus Clarke <marcus@FreeBSD.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then
sysctl hw.acpi.toshiba.lcd_brightness=$value
elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "fujitsu" ]; then
sysctl hw.acpi.fujitsu.lcd_brightness=$value
elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then
sysctl hw.acpi.asus.lcd_brightness=$value
elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then
sysctl hw.acpi.panasonic.lcd_brightness=$value
elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then
sysctl dev.acpi_ibm.0.lcd_brightness=$value
elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
sysctl dev.acpi_sony.0.brightness=$(expr $value + 1)
else
echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
echo "No ACPI method found" >&2
exit 1
fi
exit 0
|