--- tools/bsdsunix/hal-system-lcd-set-brightness-bsdsunix.orig 2016-12-05 16:21:28 UTC +++ tools/bsdsunix/hal-system-lcd-set-brightness-bsdsunix @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright (C) 2006 Joe Marcus Clarke +# +# 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