[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, shengine, updated. 1.1.0-beta.1-24-g708a531
Darren Salt
linux at youmustbejoking.demon.co.uk
Sun Jun 14 20:21:04 UTC 2009
The following commit has been merged in the shengine branch:
commit 08ae1f4aaeba8ac4ffdf3dc95d29735bc4d9fe59
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Sun Jun 14 21:06:32 2009 +0100
AC events are handled by ac_adapter.sh, not hotkey.sh.
diff --git a/etc/acpi/actions/ac_adapter.sh b/etc/acpi/actions/ac_adapter.sh
index fc6102d..d40bcdd 100755
--- a/etc/acpi/actions/ac_adapter.sh
+++ b/etc/acpi/actions/ac_adapter.sh
@@ -18,6 +18,27 @@ if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi
. /etc/acpi/lib/notify.sh
code="$3 $4"
+handle_shengine() {
+ . /etc/acpi/lib/shengine.sh
+ if [ -e "$SHENGINE_CTL" ]; then
+ if [ "$1" = '' ]; then
+ cycle_shengine
+ else
+ set_shengine "$1"
+ fi
+ if [ "$2" != '' ]; then return; fi
+ case $(get_shengine) in
+ 0) notify super_hybrid_engine 'S. H. Engine: Performance'; ;;
+ 1) notify super_hybrid_engine 'S. H. Engine: Standard'; ;;
+ 2) notify super_hybrid_engine 'S. H. Engine: Power-saving'; ;;
+ 255) notify super_hybrid_engine 'S. H. Engine: Automatic'; ;;
+ *) notify error 'S. H. Engine unavailable'
+ esac
+ else
+ notify error 'S. H. Engine unavailable'
+ fi
+}
+
case "$code" in
# AC adapter present
0000008[01]\ 00000001)
diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
index e2efddc..e355718 100755
--- a/etc/acpi/actions/hotkey.sh
+++ b/etc/acpi/actions/hotkey.sh
@@ -67,27 +67,6 @@ handle_bluetooth_toggle() {
fi
}
-handle_shengine() {
- . /etc/acpi/lib/shengine.sh
- if [ -e "$SHENGINE_CTL" ]; then
- if [ "$1" = '' ]; then
- cycle_shengine
- else
- set_shengine "$1"
- fi
- if [ "$2" != '' ]; then return; fi
- case $(get_shengine) in
- 0) notify super_hybrid_engine 'S. H. Engine: Performance'; ;;
- 1) notify super_hybrid_engine 'S. H. Engine: Standard'; ;;
- 2) notify super_hybrid_engine 'S. H. Engine: Power-saving'; ;;
- 255) notify super_hybrid_engine 'S. H. Engine: Automatic'; ;;
- *) notify error 'S. H. Engine unavailable'
- esac
- else
- notify error 'S. H. Engine unavailable'
- fi
-}
-
show_camera() {
if camera_is_on; then
notify camera 'Camera Enabled'
diff --git a/etc/acpi/events/ac_adapter_inserted b/etc/acpi/events/ac_adapter_inserted
index 8f520e5..af9eb09 100644
--- a/etc/acpi/events/ac_adapter_inserted
+++ b/etc/acpi/events/ac_adapter_inserted
@@ -1,2 +1,2 @@
event=ac_adapter .* 0000008[01] 00000001
-action=/etc/acpi/actions/hotkey.sh %e
+action=/etc/acpi/actions/ac_adapter.sh %e
diff --git a/etc/acpi/events/ac_adapter_removed b/etc/acpi/events/ac_adapter_removed
index bc1ad2d..b05b617 100644
--- a/etc/acpi/events/ac_adapter_removed
+++ b/etc/acpi/events/ac_adapter_removed
@@ -1,2 +1,2 @@
event=ac_adapter .* 0000008[01] 00000000
-action=/etc/acpi/actions/hotkey.sh %e
+action=/etc/acpi/actions/ac_adapter.sh %e
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list