summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO136
-rw-r--r--PKGBUILD156
-rw-r--r--acpi-eeepc-1000-events.conf56
-rw-r--r--acpi-eeepc-1000H-events.conf56
-rw-r--r--acpi-eeepc-1000HD-events.conf56
-rw-r--r--acpi-eeepc-1000HE-events.conf61
-rw-r--r--acpi-eeepc-1001P-events.conf50
-rw-r--r--acpi-eeepc-1001PX-events.conf50
-rw-r--r--acpi-eeepc-1005-HA-H-events.conf59
-rw-r--r--acpi-eeepc-1005HA-events.conf50
-rw-r--r--acpi-eeepc-1005HAG-events.conf50
-rw-r--r--acpi-eeepc-1005P-events.conf55
-rw-r--r--acpi-eeepc-1005PE-events.conf55
-rw-r--r--acpi-eeepc-1005PEB-events.conf55
-rw-r--r--acpi-eeepc-1005PX-events.conf55
-rw-r--r--acpi-eeepc-1005PXD-events.conf55
-rw-r--r--acpi-eeepc-1008HA-events.conf50
-rw-r--r--acpi-eeepc-1015B-events.conf55
-rw-r--r--acpi-eeepc-1015P-events.conf55
-rw-r--r--acpi-eeepc-1015PEM-events.conf55
-rw-r--r--acpi-eeepc-1015T-events.conf55
-rw-r--r--acpi-eeepc-1201HA-events.conf51
-rw-r--r--acpi-eeepc-1201N-events.conf51
-rw-r--r--acpi-eeepc-1201NL-events.conf51
-rw-r--r--acpi-eeepc-1201PN-events.conf51
-rw-r--r--acpi-eeepc-1215B-events.conf51
-rw-r--r--acpi-eeepc-1215N-events.conf51
-rw-r--r--acpi-eeepc-700-events.conf55
-rw-r--r--acpi-eeepc-701-events.conf55
-rw-r--r--acpi-eeepc-900-events.conf55
-rw-r--r--acpi-eeepc-900A-events.conf50
-rw-r--r--acpi-eeepc-901-events.conf55
-rw-r--r--acpi-eeepc-904HD-events.conf56
-rw-r--r--acpi-eeepc-S101-events.conf51
-rw-r--r--acpi-eeepc-T101MT-events.conf58
-rw-r--r--acpi-eeepc-T91MT-events.conf58
-rw-r--r--acpi-eeepc-X101H-events.conf51
-rw-r--r--acpi-eeepc-defaults-events.conf66
-rw-r--r--acpi-eeepc-generic-events3
-rw-r--r--acpi-eeepc-generic-functions.sh716
-rw-r--r--acpi-eeepc-generic-handler.sh288
-rw-r--r--acpi-eeepc-generic-logsbackup.rcd35
-rw-r--r--acpi-eeepc-generic-restore.rcd70
-rw-r--r--acpi-eeepc-generic-rotate-lvds.sh80
-rw-r--r--acpi-eeepc-generic-suspend2ram.sh95
-rw-r--r--acpi-eeepc-generic-toggle-bluetooth.sh71
-rw-r--r--acpi-eeepc-generic-toggle-cardr.sh71
-rw-r--r--acpi-eeepc-generic-toggle-displays.sh253
-rw-r--r--acpi-eeepc-generic-toggle-lock-suspend.sh36
-rw-r--r--acpi-eeepc-generic-toggle-resolution.sh60
-rw-r--r--acpi-eeepc-generic-toggle-she.sh100
-rw-r--r--acpi-eeepc-generic-toggle-touchpad.sh88
-rw-r--r--acpi-eeepc-generic-toggle-webcam.sh65
-rw-r--r--acpi-eeepc-generic-toggle-wifi.sh80
-rw-r--r--acpi-eeepc-generic.conf237
-rw-r--r--acpi-eeepc-generic.install41
56 files changed, 4630 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..110b9d16ae2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,136 @@
+pkgbase = acpi-eeepc-generic
+ pkgdesc = ACPI scripts for many EeePC netbook computers
+ pkgver = 1.0.2
+ pkgrel = 3
+ url = https://github.com/nbigaouette/acpi-eeepc-generic
+ install = acpi-eeepc-generic.install
+ arch = any
+ license = GPL3
+ depends = acpid
+ depends = xorg-server-utils
+ depends = dmidecode
+ optdepends = unclutter: Hide cursor when touchpad is disabled
+ optdepends = kdebase-runtime: KDE's super-user privileges gaining
+ optdepends = kdebase-kdialog: KDE's OSD
+ optdepends = sudo: super-user privileges gaining
+ optdepends = gksu: GNOME/GTK super-user privileges gaining
+ optdepends = pm-utils: Power management (suspend and hibernate) utilities
+ conflicts = acpi-eee
+ conflicts = acpi-eee900
+ conflicts = acpi-eee901
+ conflicts = acpi-eee1000
+ conflicts = acpi-eeepc900
+ conflicts = buttons-eee901
+ conflicts = e3acpi
+ conflicts = eee-control
+ conflicts = eee-fan
+ backup = etc/conf.d/acpi-eeepc-generic.conf
+ source = acpi-eeepc-generic-events
+ source = acpi-eeepc-defaults-events.conf
+ source = acpi-eeepc-1000-events.conf
+ source = acpi-eeepc-1000HD-events.conf
+ source = acpi-eeepc-1000HE-events.conf
+ source = acpi-eeepc-1000H-events.conf
+ source = acpi-eeepc-1001P-events.conf
+ source = acpi-eeepc-1001PX-events.conf
+ source = acpi-eeepc-1005HA-events.conf
+ source = acpi-eeepc-1005-HA-H-events.conf
+ source = acpi-eeepc-1005HAG-events.conf
+ source = acpi-eeepc-1005PE-events.conf
+ source = acpi-eeepc-1005PEB-events.conf
+ source = acpi-eeepc-1005P-events.conf
+ source = acpi-eeepc-1005PX-events.conf
+ source = acpi-eeepc-1005PXD-events.conf
+ source = acpi-eeepc-1008HA-events.conf
+ source = acpi-eeepc-1015B-events.conf
+ source = acpi-eeepc-1015P-events.conf
+ source = acpi-eeepc-1015PEM-events.conf
+ source = acpi-eeepc-1015T-events.conf
+ source = acpi-eeepc-1201HA-events.conf
+ source = acpi-eeepc-1201N-events.conf
+ source = acpi-eeepc-1201PN-events.conf
+ source = acpi-eeepc-1201NL-events.conf
+ source = acpi-eeepc-1215N-events.conf
+ source = acpi-eeepc-1215B-events.conf
+ source = acpi-eeepc-700-events.conf
+ source = acpi-eeepc-701-events.conf
+ source = acpi-eeepc-900A-events.conf
+ source = acpi-eeepc-900-events.conf
+ source = acpi-eeepc-901-events.conf
+ source = acpi-eeepc-904HD-events.conf
+ source = acpi-eeepc-S101-events.conf
+ source = acpi-eeepc-T101MT-events.conf
+ source = acpi-eeepc-T91MT-events.conf
+ source = acpi-eeepc-X101H-events.conf
+ source = acpi-eeepc-generic-functions.sh
+ source = acpi-eeepc-generic-handler.sh
+ source = acpi-eeepc-generic-logsbackup.rcd
+ source = acpi-eeepc-generic-restore.rcd
+ source = acpi-eeepc-generic-rotate-lvds.sh
+ source = acpi-eeepc-generic-suspend2ram.sh
+ source = acpi-eeepc-generic-toggle-bluetooth.sh
+ source = acpi-eeepc-generic-toggle-cardr.sh
+ source = acpi-eeepc-generic-toggle-displays.sh
+ source = acpi-eeepc-generic-toggle-lock-suspend.sh
+ source = acpi-eeepc-generic-toggle-resolution.sh
+ source = acpi-eeepc-generic-toggle-she.sh
+ source = acpi-eeepc-generic-toggle-touchpad.sh
+ source = acpi-eeepc-generic-toggle-webcam.sh
+ source = acpi-eeepc-generic-toggle-wifi.sh
+ source = acpi-eeepc-generic.conf
+ sha256sums = 5baf7e533c3292411cbd3a54455e2405be242cb4c251f6f9b718f54922e057ca
+ sha256sums = 27d8bfbdd86146c04c5fca97d01438e6a11ebb46cc63ed3136f066d6fc95ad9f
+ sha256sums = b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15
+ sha256sums = b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15
+ sha256sums = c2fed04c1f909ee01a3741f8e4285b3c0ae81db3389a93cceed972b680859a7f
+ sha256sums = b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15
+ sha256sums = 7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab
+ sha256sums = e861cee3b7ec83512c8e5776f72a5d9514a1c230da87e41500a02873a140170d
+ sha256sums = 7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab
+ sha256sums = 10ccdc92b54a8c12e6aff377b5b41dfbe2fbd42acd321961e78de2e602c819a3
+ sha256sums = 7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 3ba29518f78589a55794047ae5cb499131ceb168fe79032db19ed9b82d8a4ffc
+ sha256sums = 3ba29518f78589a55794047ae5cb499131ceb168fe79032db19ed9b82d8a4ffc
+ sha256sums = 18ab9bdceea55d9460ed1305d2775f992d119e37ea99913856fba827356a0d99
+ sha256sums = 417b5887be74f92ca4696c56fc7cf396c3a2bd293286ef0e150a31842d094b38
+ sha256sums = bc8a5d152b00f6a893da97349eb16dcafb84d3f805c4c85656a390d225f17af6
+ sha256sums = f78685fcea35bf33759a05a297a4772ab6e3c7d0233ca69573e4331896c27d9e
+ sha256sums = f00945d10ddf3bf7b2967e14acee85ef185928b6878607a1e32c0c618517a24d
+ sha256sums = 738d2762cb31825a145100f84f2e5c8df9b67ffac6f8427c4f139aef2c8634c4
+ sha256sums = 738d2762cb31825a145100f84f2e5c8df9b67ffac6f8427c4f139aef2c8634c4
+ sha256sums = 45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f
+ sha256sums = 9e2957ae2285a1b2a7ba20c2e654e6e51007332dd8d753677d5ae62aaeab11cb
+ sha256sums = c0cae32766c5c8a7533ece16a44e3a9073e8bde7c19c5b521770085ce311ad03
+ sha256sums = ee802009dec7ef5ad891b324cfb58af62c34595bbf7306ec9dd4b29d08e2e05a
+ sha256sums = f365dc3f8755502629b5659e01518a507e90ebf148346b9b00009246261166ae
+ sha256sums = 524cfd1ebdfcc8f0b629360a6d0d4927c139dc7cd6b586ebd43cadf8865916fe
+ sha256sums = 7f21b811b246213edb070a1409b322c8107a54056d065609c9ab5c37c5cdbdcf
+ sha256sums = 0dd10853477c736038e8b222eabde736c18a63545e5ba0a5afe79e790ef2712f
+ sha256sums = 534d607f7f91fe3d1aaf0e073424df65da0115bbee35a34b23748e9e583d9a36
+ sha256sums = 2b654b0403fc39396cfdd5da21e701a149ffaa56afb683936389793fa16364ee
+ sha256sums = 8ea1efdf4fc6ec4658db12ec7054cf46f8bd59f3d745ea8d0cd604a91ac79382
+ sha256sums = 3d3ae3b50755ca402b4e268cc4e20a8b129fca9e3ff09583834e89856536c2db
+ sha256sums = ac7fead818cdc33d4157dcade7afb948bd841380fb1b59eab04784b2d217b867
+ sha256sums = f76e65c6403a99480e6df35389c6700030239bb07a5d1b71c8069ad860c9efe8
+ sha256sums = 10b2dcb4e66b111f3a30bde196e171065236e292bfea20a333626c4649a841e3
+ sha256sums = 14d7f714f4f7ec409dedb3461431631811af3ffc13db7fbc3efeb8313e623b52
+ sha256sums = 7b48dcfcb4a1af44035194668190608b291b43ade045f4a2382d30bc1ef10d0d
+
+pkgname = acpi-eeepc-generic
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e5fb6829f25
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,156 @@
+# Maintainer: André Fettouhi a.fettouhi at gmail com
+# Contributor: Nicolas Bigaouette nbigaouette at gmail com
+
+pkgname=acpi-eeepc-generic
+pkgver=1.0.2
+pkgrel=3
+pkgdesc="ACPI scripts for many EeePC netbook computers"
+url="https://github.com/nbigaouette/acpi-eeepc-generic"
+arch=(any)
+license=(GPL3)
+depends=(acpid xorg-server-utils dmidecode)
+optdepends=(
+ "unclutter: Hide cursor when touchpad is disabled"
+ "kdebase-runtime: KDE's super-user privileges gaining"
+ "kdebase-kdialog: KDE's OSD"
+ "sudo: super-user privileges gaining"
+ "gksu: GNOME/GTK super-user privileges gaining"
+ "pm-utils: Power management (suspend and hibernate) utilities"
+)
+install=acpi-eeepc-generic.install
+backup=(etc/conf.d/acpi-eeepc-generic.conf)
+conflicts=("acpi-eee" "acpi-eee900" "acpi-eee901" "acpi-eee1000" "acpi-eeepc900" "buttons-eee901" "e3acpi" "eee-control" "eee-fan")
+source=(
+ "acpi-eeepc-generic-events"
+ "acpi-eeepc-defaults-events.conf"
+ "acpi-eeepc-1000-events.conf"
+ "acpi-eeepc-1000HD-events.conf"
+ "acpi-eeepc-1000HE-events.conf"
+ "acpi-eeepc-1000H-events.conf"
+ "acpi-eeepc-1001P-events.conf"
+ "acpi-eeepc-1001PX-events.conf"
+ "acpi-eeepc-1005HA-events.conf"
+ "acpi-eeepc-1005-HA-H-events.conf"
+ "acpi-eeepc-1005HAG-events.conf"
+ "acpi-eeepc-1005PE-events.conf"
+ "acpi-eeepc-1005PEB-events.conf"
+ "acpi-eeepc-1005P-events.conf"
+ "acpi-eeepc-1005PX-events.conf"
+ "acpi-eeepc-1005PXD-events.conf"
+ "acpi-eeepc-1008HA-events.conf"
+ "acpi-eeepc-1015B-events.conf"
+ "acpi-eeepc-1015P-events.conf"
+ "acpi-eeepc-1015PEM-events.conf"
+ "acpi-eeepc-1015T-events.conf"
+ "acpi-eeepc-1201HA-events.conf"
+ "acpi-eeepc-1201N-events.conf"
+ "acpi-eeepc-1201PN-events.conf"
+ "acpi-eeepc-1201NL-events.conf"
+ "acpi-eeepc-1215N-events.conf"
+ "acpi-eeepc-1215B-events.conf"
+ "acpi-eeepc-700-events.conf"
+ "acpi-eeepc-701-events.conf"
+ "acpi-eeepc-900A-events.conf"
+ "acpi-eeepc-900-events.conf"
+ "acpi-eeepc-901-events.conf"
+ "acpi-eeepc-904HD-events.conf"
+ "acpi-eeepc-S101-events.conf"
+ "acpi-eeepc-T101MT-events.conf"
+ "acpi-eeepc-T91MT-events.conf"
+ "acpi-eeepc-X101H-events.conf"
+ "acpi-eeepc-generic-functions.sh"
+ "acpi-eeepc-generic-handler.sh"
+ "acpi-eeepc-generic-logsbackup.rcd"
+ "acpi-eeepc-generic-restore.rcd"
+ "acpi-eeepc-generic-rotate-lvds.sh"
+ "acpi-eeepc-generic-suspend2ram.sh"
+ "acpi-eeepc-generic-toggle-bluetooth.sh"
+ "acpi-eeepc-generic-toggle-cardr.sh"
+ "acpi-eeepc-generic-toggle-displays.sh"
+ "acpi-eeepc-generic-toggle-lock-suspend.sh"
+ "acpi-eeepc-generic-toggle-resolution.sh"
+ "acpi-eeepc-generic-toggle-she.sh"
+ "acpi-eeepc-generic-toggle-touchpad.sh"
+ "acpi-eeepc-generic-toggle-webcam.sh"
+ "acpi-eeepc-generic-toggle-wifi.sh"
+ "acpi-eeepc-generic.conf")
+
+package() {
+ mkdir -p $pkgdir/{etc/{acpi/{eeepc/models,events},conf.d,rc.d},usr/share/{applications,pixmaps}} || return 1
+
+ # Install our own handler
+ install -m0755 ${srcdir}/acpi-eeepc-generic-handler.sh ${pkgdir}/etc/acpi/acpi-eeepc-generic-handler.sh || return 1
+ install -m0755 ${srcdir}/acpi-eeepc-generic-functions.sh ${pkgdir}/etc/acpi/eeepc/acpi-eeepc-generic-functions.sh || return 1
+ install -m0755 ${srcdir}/acpi-eeepc-generic-events ${pkgdir}/etc/acpi/events/acpi-eeepc-generic-events || return 1
+
+ install -m0644 ${srcdir}/acpi-eeepc-generic.conf ${pkgdir}/etc/conf.d/acpi-eeepc-generic.conf || return 1
+
+ # Install events configuration files for each model
+ for f in ${srcdir}/acpi-eeepc-*-events.conf; do
+ install -m0644 $f ${pkgdir}/etc/acpi/eeepc/models || return 1
+ done
+
+ install -m0755 ${srcdir}/acpi-eeepc-generic-restore.rcd ${pkgdir}/etc/rc.d/eeepc-restore || return 1
+ install -m0755 ${srcdir}/acpi-eeepc-generic-logsbackup.rcd ${pkgdir}/etc/rc.d/logsbackup || return 1
+
+ # Helper scripts
+ install -m0755 ${srcdir}/acpi-eeepc-generic-rotate-lvds.sh ${pkgdir}/etc/acpi/eeepc || return 1
+ install -m0755 ${srcdir}/acpi-eeepc-generic-suspend2ram.sh ${pkgdir}/etc/acpi/eeepc || return 1
+ for f in ${srcdir}/acpi-eeepc-generic-toggle-*.sh; do
+ install -m0755 $f ${pkgdir}/etc/acpi/eeepc || return 1
+ done
+}
+
+sha256sums=('5baf7e533c3292411cbd3a54455e2405be242cb4c251f6f9b718f54922e057ca'
+ '27d8bfbdd86146c04c5fca97d01438e6a11ebb46cc63ed3136f066d6fc95ad9f'
+ 'b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15'
+ 'b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15'
+ 'c2fed04c1f909ee01a3741f8e4285b3c0ae81db3389a93cceed972b680859a7f'
+ 'b5e805c8e754613a89a2ad7059562fb43aaac3dc2851f3fb3a6bf0369680ec15'
+ '7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab'
+ 'e861cee3b7ec83512c8e5776f72a5d9514a1c230da87e41500a02873a140170d'
+ '7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab'
+ '10ccdc92b54a8c12e6aff377b5b41dfbe2fbd42acd321961e78de2e602c819a3'
+ '7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '7e3efd585abe9916ffd90634b1795f127b60bc5c005220f1c40f38cc16aed8ab'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '53367ca3d5056318507e5d6a22177d83fac37db3f7100d4023baaeea9fb2b152'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '3ba29518f78589a55794047ae5cb499131ceb168fe79032db19ed9b82d8a4ffc'
+ '3ba29518f78589a55794047ae5cb499131ceb168fe79032db19ed9b82d8a4ffc'
+ '18ab9bdceea55d9460ed1305d2775f992d119e37ea99913856fba827356a0d99'
+ '417b5887be74f92ca4696c56fc7cf396c3a2bd293286ef0e150a31842d094b38'
+ 'bc8a5d152b00f6a893da97349eb16dcafb84d3f805c4c85656a390d225f17af6'
+ 'f78685fcea35bf33759a05a297a4772ab6e3c7d0233ca69573e4331896c27d9e'
+ 'f00945d10ddf3bf7b2967e14acee85ef185928b6878607a1e32c0c618517a24d'
+ '738d2762cb31825a145100f84f2e5c8df9b67ffac6f8427c4f139aef2c8634c4'
+ '738d2762cb31825a145100f84f2e5c8df9b67ffac6f8427c4f139aef2c8634c4'
+ '45ee0bcf89e059ed2b4b63a5b86cb69ef8fb7d2a0e8dd3e749c6670837874d8f'
+ '9e2957ae2285a1b2a7ba20c2e654e6e51007332dd8d753677d5ae62aaeab11cb'
+ 'c0cae32766c5c8a7533ece16a44e3a9073e8bde7c19c5b521770085ce311ad03'
+ 'ee802009dec7ef5ad891b324cfb58af62c34595bbf7306ec9dd4b29d08e2e05a'
+ 'f365dc3f8755502629b5659e01518a507e90ebf148346b9b00009246261166ae'
+ '524cfd1ebdfcc8f0b629360a6d0d4927c139dc7cd6b586ebd43cadf8865916fe'
+ '7f21b811b246213edb070a1409b322c8107a54056d065609c9ab5c37c5cdbdcf'
+ '0dd10853477c736038e8b222eabde736c18a63545e5ba0a5afe79e790ef2712f'
+ '534d607f7f91fe3d1aaf0e073424df65da0115bbee35a34b23748e9e583d9a36'
+ '2b654b0403fc39396cfdd5da21e701a149ffaa56afb683936389793fa16364ee'
+ '8ea1efdf4fc6ec4658db12ec7054cf46f8bd59f3d745ea8d0cd604a91ac79382'
+ '3d3ae3b50755ca402b4e268cc4e20a8b129fca9e3ff09583834e89856536c2db'
+ 'ac7fead818cdc33d4157dcade7afb948bd841380fb1b59eab04784b2d217b867'
+ 'f76e65c6403a99480e6df35389c6700030239bb07a5d1b71c8069ad860c9efe8'
+ '10b2dcb4e66b111f3a30bde196e171065236e292bfea20a333626c4649a841e3'
+ '14d7f714f4f7ec409dedb3461431631811af3ffc13db7fbc3efeb8313e623b52'
+ '7b48dcfcb4a1af44035194668190608b291b43ade045f4a2382d30bc1ef10d0d')
diff --git a/acpi-eeepc-1000-events.conf b/acpi-eeepc-1000-events.conf
new file mode 100644
index 00000000000..427c7d032f9
--- /dev/null
+++ b/acpi-eeepc-1000-events.conf
@@ -0,0 +1,56 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F8[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F8[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F8[2]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1000H-events.conf b/acpi-eeepc-1000H-events.conf
new file mode 100644
index 00000000000..427c7d032f9
--- /dev/null
+++ b/acpi-eeepc-1000H-events.conf
@@ -0,0 +1,56 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F8[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F8[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F8[2]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1000HD-events.conf b/acpi-eeepc-1000HD-events.conf
new file mode 100644
index 00000000000..427c7d032f9
--- /dev/null
+++ b/acpi-eeepc-1000HD-events.conf
@@ -0,0 +1,56 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F8[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F8[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F8[2]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1000HE-events.conf b/acpi-eeepc-1000HE-events.conf
new file mode 100644
index 00000000000..1485edffafe
--- /dev/null
+++ b/acpi-eeepc-1000HE-events.conf
@@ -0,0 +1,61 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1001P-events.conf b/acpi-eeepc-1001P-events.conf
new file mode 100644
index 00000000000..a58fec30499
--- /dev/null
+++ b/acpi-eeepc-1001P-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="0000001b" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_RESOLUTION=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1001PX-events.conf b/acpi-eeepc-1001PX-events.conf
new file mode 100644
index 00000000000..55a17d6a169
--- /dev/null
+++ b/acpi-eeepc-1001PX-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_RESOLUTION=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005-HA-H-events.conf b/acpi-eeepc-1005-HA-H-events.conf
new file mode 100644
index 00000000000..0ffac016d43
--- /dev/null
+++ b/acpi-eeepc-1005-HA-H-events.conf
@@ -0,0 +1,59 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005HA-events.conf b/acpi-eeepc-1005HA-events.conf
new file mode 100644
index 00000000000..a58fec30499
--- /dev/null
+++ b/acpi-eeepc-1005HA-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="0000001b" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_RESOLUTION=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005HAG-events.conf b/acpi-eeepc-1005HAG-events.conf
new file mode 100644
index 00000000000..a58fec30499
--- /dev/null
+++ b/acpi-eeepc-1005HAG-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="0000001b" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_RESOLUTION=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005P-events.conf b/acpi-eeepc-1005P-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1005P-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005PE-events.conf b/acpi-eeepc-1005PE-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1005PE-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005PEB-events.conf b/acpi-eeepc-1005PEB-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1005PEB-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005PX-events.conf b/acpi-eeepc-1005PX-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1005PX-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1005PXD-events.conf b/acpi-eeepc-1005PXD-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1005PXD-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1008HA-events.conf b/acpi-eeepc-1008HA-events.conf
new file mode 100644
index 00000000000..a58fec30499
--- /dev/null
+++ b/acpi-eeepc-1008HA-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="0000001b" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_RESOLUTION=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1015B-events.conf b/acpi-eeepc-1015B-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1015B-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1015P-events.conf b/acpi-eeepc-1015P-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1015P-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1015PEM-events.conf b/acpi-eeepc-1015PEM-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1015PEM-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1015T-events.conf b/acpi-eeepc-1015T-events.conf
new file mode 100644
index 00000000000..aec67f6eeb0
--- /dev/null
+++ b/acpi-eeepc-1015T-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+KEY_SILVER1=NONE
+KEY_SILVER2=NONE
+KEY_SILVER3=NONE
+KEY_SILVER4=NONE
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="00000037" # Touchpad
+KEY_Fn_F4="00000038" # Resolution
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F3
+EEEPC_ROTATE=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-1201HA-events.conf b/acpi-eeepc-1201HA-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1201HA-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-1201N-events.conf b/acpi-eeepc-1201N-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1201N-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-1201NL-events.conf b/acpi-eeepc-1201NL-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1201NL-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-1201PN-events.conf b/acpi-eeepc-1201PN-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1201PN-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-1215B-events.conf b/acpi-eeepc-1215B-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1215B-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-1215N-events.conf b/acpi-eeepc-1215N-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-1215N-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-700-events.conf b/acpi-eeepc-700-events.conf
new file mode 100644
index 00000000000..299654cb6bf
--- /dev/null
+++ b/acpi-eeepc-700-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_UP=${KEY_Fn_F2[0]}
+EEEPC_WIFI_DOWN=${KEY_Fn_F2[1]}
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
diff --git a/acpi-eeepc-701-events.conf b/acpi-eeepc-701-events.conf
new file mode 100644
index 00000000000..299654cb6bf
--- /dev/null
+++ b/acpi-eeepc-701-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_UP=${KEY_Fn_F2[0]}
+EEEPC_WIFI_DOWN=${KEY_Fn_F2[1]}
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
diff --git a/acpi-eeepc-900-events.conf b/acpi-eeepc-900-events.conf
new file mode 100644
index 00000000000..b93e462d4b8
--- /dev/null
+++ b/acpi-eeepc-900-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
+
diff --git a/acpi-eeepc-900A-events.conf b/acpi-eeepc-900A-events.conf
new file mode 100644
index 00000000000..d8b268194ef
--- /dev/null
+++ b/acpi-eeepc-900A-events.conf
@@ -0,0 +1,50 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2="00000010" # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=$KEY_Fn_F2
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
+
diff --git a/acpi-eeepc-901-events.conf b/acpi-eeepc-901-events.conf
new file mode 100644
index 00000000000..eb83866141e
--- /dev/null
+++ b/acpi-eeepc-901-events.conf
@@ -0,0 +1,55 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2="00000010" # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=$KEY_Fn_F2
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
+
diff --git a/acpi-eeepc-904HD-events.conf b/acpi-eeepc-904HD-events.conf
new file mode 100644
index 00000000000..68679dbf5dd
--- /dev/null
+++ b/acpi-eeepc-904HD-events.conf
@@ -0,0 +1,56 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="0000001a" # Blank
+KEY_SILVER2="0000001b" # Change resolution
+KEY_SILVER3="0000001c" # User 1
+KEY_SILVER4="0000001d" # User 2
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000016" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_UP=${KEY_Fn_F2[0]}
+EEEPC_WIFI_DOWN=${KEY_Fn_F2[1]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
+
diff --git a/acpi-eeepc-S101-events.conf b/acpi-eeepc-S101-events.conf
new file mode 100644
index 00000000000..06b7cb183bd
--- /dev/null
+++ b/acpi-eeepc-S101-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="00000039" # Single silver hotkey
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F9="00000012" # Task Manager
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=$KEY_SILVER1
+EEEPC_RESOLUTION=$KEY_SILVER2
+EEEPC_USER1=$KEY_SILVER3
+EEEPC_USER2=$KEY_SILVER4
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=${KEY_Fn_F8[0]}
+EEEPC_TASKMAN=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
diff --git a/acpi-eeepc-T101MT-events.conf b/acpi-eeepc-T101MT-events.conf
new file mode 100644
index 00000000000..8b469593cbf
--- /dev/null
+++ b/acpi-eeepc-T101MT-events.conf
@@ -0,0 +1,58 @@
+# Copyright 2010 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="NONE"
+KEY_SILVER2="NONE"
+KEY_SILVER3="NONE"
+KEY_SILVER4="NONE"
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+KEY_Fn_F10="NONE"
+KEY_Fn_F11="NONE"
+KEY_Fn_F12="NONE"
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=NONE
+EEEPC_RESOLUTION=NONE
+EEEPC_USER1=NONE
+EEEPC_USER2=NONE
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_SCREEN_OFF=NONE
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
diff --git a/acpi-eeepc-T91MT-events.conf b/acpi-eeepc-T91MT-events.conf
new file mode 100644
index 00000000000..8b469593cbf
--- /dev/null
+++ b/acpi-eeepc-T91MT-events.conf
@@ -0,0 +1,58 @@
+# Copyright 2010 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1="NONE"
+KEY_SILVER2="NONE"
+KEY_SILVER3="NONE"
+KEY_SILVER4="NONE"
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+KEY_Fn_F3="0000002*" # Brightness down
+KEY_Fn_F4="0000002*" # Brightness up
+KEY_Fn_F5=("00000030" "00000031" "00000032") # XRandR
+KEY_Fn_F6="00000012" # Task Manager
+KEY_Fn_F7="00000013" # Mute
+KEY_Fn_F8="00000014" # Volume Down
+KEY_Fn_F9="00000015" # Volume Up
+KEY_Fn_F10="NONE"
+KEY_Fn_F11="NONE"
+KEY_Fn_F12="NONE"
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=NONE
+EEEPC_RESOLUTION=NONE
+EEEPC_USER1=NONE
+EEEPC_USER2=NONE
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F4
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F3
+EEEPC_SCREEN_OFF=NONE
+EEEPC_XRANDR_TOGGLE_0=${KEY_Fn_F5[0]}
+EEEPC_XRANDR_TOGGLE_1=${KEY_Fn_F5[1]}
+EEEPC_XRANDR_TOGGLE_2=${KEY_Fn_F5[2]}
+EEEPC_TASKMAN=$KEY_Fn_F6
+EEEPC_VOL_MUTE=$KEY_Fn_F7
+EEEPC_VOL_DOWN=$KEY_Fn_F8
+EEEPC_VOL_UP=$KEY_Fn_F9
diff --git a/acpi-eeepc-X101H-events.conf b/acpi-eeepc-X101H-events.conf
new file mode 100644
index 00000000000..1f5eab25f0b
--- /dev/null
+++ b/acpi-eeepc-X101H-events.conf
@@ -0,0 +1,51 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This laptop has one silver button (touchpad), witch give same code as Fn+F9
+
+# Fn+F? combination
+KEY_Fn_F1="00000080" # Sleep
+KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
+# Fn+F3 and Fn+F4 does not have functions
+KEY_Fn_F5="0000002*" # Brightness down
+KEY_Fn_F6="0000002*" # Brightness up
+KEY_Fn_F7="00000016" # Cross Screen Icon (Blank)
+KEY_Fn_F8="00000030" # XRandR
+KEY_Fn_F9="00000037" # Touchpad
+KEY_Fn_F10="00000013" # Mute
+KEY_Fn_F11="00000014" # Volume Down
+KEY_Fn_F12="00000015" # Volume Up
+KEY_Fn_Space="00000039" # Space Bar
+KEY_Fn_C="0000003c" # Resolution
+
+
+#################################################################
+### Match previous to functions
+
+EEEPC_SLEEP=$KEY_Fn_F1
+EEEPC_WIFI_TOGGLE=${KEY_Fn_F2[0]}
+EEEPC_BRIGHTNESS_UP=$KEY_Fn_F5
+EEEPC_BRIGHTNESS_DOWN=$KEY_Fn_F6
+EEEPC_SCREEN_OFF=$KEY_Fn_F7
+EEEPC_XRANDR_TOGGLE=$KEY_Fn_F8
+EEEPC_TOUCHPAD_TOGGLE=$KEY_Fn_F9
+EEEPC_VOL_MUTE=$KEY_Fn_F10
+EEEPC_VOL_DOWN=$KEY_Fn_F11
+EEEPC_VOL_UP=$KEY_Fn_F12
+EEEPC_SHE_TOGGLE=$KEY_Fn_Space
+EEEPC_RESOLUTION=$KEY_Fn_C
diff --git a/acpi-eeepc-defaults-events.conf b/acpi-eeepc-defaults-events.conf
new file mode 100644
index 00000000000..9e30a20a25a
--- /dev/null
+++ b/acpi-eeepc-defaults-events.conf
@@ -0,0 +1,66 @@
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Silver buttons
+KEY_SILVER1=NONE # Blank
+KEY_SILVER2=NONE # Change resolution
+KEY_SILVER3=NONE # User 1
+KEY_SILVER4=NONE # User 2
+
+# Fn+F? combination
+KEY_Fn_F1=NONE # Sleep
+KEY_Fn_F2=NONE # Wifi toggle
+KEY_Fn_F3=NONE # Touchpad
+KEY_Fn_F4=NONE # Resolution
+KEY_Fn_F5=NONE # Brightness down
+KEY_Fn_F6=NONE # Brightness up
+KEY_Fn_F7=NONE # Cross Screen Icon (Blank)
+KEY_Fn_F8=NONE # XRandR
+KEY_Fn_F9=NONE # Task Manager
+KEY_Fn_F10=NONE # Mute
+KEY_Fn_F11=NONE # Volume Down
+KEY_Fn_F12=NONE # Volume Up
+KEY_Fn_Space=NONE # Space Bar
+
+
+#################################################################
+### Match previous to functions
+EEEPC_BLANK=NONE
+EEEPC_RESOLUTION=NONE
+EEEPC_USER1=NONE
+EEEPC_USER2=NONE
+
+EEEPC_SHE_TOGGLE=NONE
+
+EEEPC_SLEEP=NONE
+EEEPC_WIFI_TOGGLE=NONE
+EEEPC_WIFI_UP=NONE
+EEEPC_WIFI_DOWN=NONE
+EEEPC_TOUCHPAD_TOGGLE=NONE
+EEEPC_ROTATE=NONE
+EEEPC_BRIGHTNESS_UP=NONE
+EEEPC_BRIGHTNESS_DOWN=NONE
+EEEPC_SCREEN_OFF=NONE
+EEEPC_XRANDR_TOGGLE=NONE
+EEEPC_XRANDR_TOGGLE_0=NONE
+EEEPC_XRANDR_TOGGLE_1=NONE
+EEEPC_XRANDR_TOGGLE_2=NONE
+EEEPC_TASKMAN=NONE
+EEEPC_VOL_MUTE=NONE
+EEEPC_VOL_DOWN=NONE
+EEEPC_VOL_UP=NONE
diff --git a/acpi-eeepc-generic-events b/acpi-eeepc-generic-events
new file mode 100644
index 00000000000..661b4497301
--- /dev/null
+++ b/acpi-eeepc-generic-events
@@ -0,0 +1,3 @@
+event=.*
+action=/etc/acpi/acpi-eeepc-generic-handler.sh %e
+
diff --git a/acpi-eeepc-generic-functions.sh b/acpi-eeepc-generic-functions.sh
new file mode 100644
index 00000000000..177c2b763c0
--- /dev/null
+++ b/acpi-eeepc-generic-functions.sh
@@ -0,0 +1,716 @@
+#!/bin/bash
+#
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+#################################################################
+### Needed path
+EEEPC_PATH=/etc/acpi/eeepc
+EEEPC_VAR=/var/eeepc
+
+# Load configuration
+. /etc/conf.d/acpi-eeepc-generic.conf
+
+[ ! -d "${EEEPC_VAR}/states" ] && mkdir -p ${EEEPC_VAR}/states
+
+chmod a+w ${EEEPC_VAR}/states/* &> /dev/null
+
+### Extract kernel version
+KERNEL=`uname -r`
+KERNEL=${KERNEL%%-*}
+KERNEL_maj=${KERNEL%%\.*}
+k=${KERNEL#${KERNEL_maj}.}
+KERNEL_min=${k%%\.*}
+k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.}
+KERNEL_rel=${k%%\.*}
+k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.${KERNEL_rel}}
+KERNEL_patch=${k%%\.*}
+
+### Some paths
+rfkills_path="/sys/class/rfkill"
+sys_path="/sys/devices/platform/eeepc"
+unset eee_backlight eee_backlight_tmp
+eee_backlight_tmp=(`\ls /sys/class/backlight/`)
+eee_backlight="/sys/class/backlight/${eee_backlight_tmp[0]}" # take first
+
+### Maximum try for toggling. Should not be even needed
+TOGGLE_MAX_TRY=3
+
+### Generic notification function ###############################
+function eeepc_notify {
+ # $1: Message
+ # $2: Icon (only libnotify)
+ # $3: Duration [ms] (optional)
+ if [ "$NOTIFY" == "libnotify" ]; then
+ send_libnotify "$1" "$2" "$3"
+ elif [ "$NOTIFY" == "kdialog" ]; then
+ send_kdialog "$1" "$2" "$3"
+ elif [ "$NOTIFY" == "dzen" ]; then
+ send_dzen "$1" "$2" "$3"
+ elif [ "$NOTIFY" == "naughty" ]; then
+ send_naughty "$1" "$2" "$3"
+ fi
+ logger "EeePC $EEEPC_MODEL: $1 ($2)"
+}
+
+### libnotify ###################################################
+function send_libnotify() {
+ if [ ! -e /usr/bin/notify-send ]; then
+ logger "To use libnotify's OSD, please install 'notification-daemon'"
+ echo "To use libnotify's OSD, please install 'notification-daemon'"
+ return 1
+ fi
+ icon=$2
+ duration=$3
+ [ "x$icon" == "x" ] && icon="eee"
+ [ "x$duration" == "x" ] && duration=${NOTIFY_DURATION}
+ cmd="/usr/bin/notify-send -i $icon -t $duration \"EeePC $EEEPC_MODEL\" \"$1\""
+ send_generic "${cmd}"
+}
+
+### kdialog #####################################################
+function send_kdialog() {
+ if [ ! -e /usr/bin/kdialog ]; then
+ logger "To use kdialog's OSD, please install 'kdebase'"
+ echo "To use kdialog's OSD, please install 'kdebase'"
+ return 1
+ fi
+ duration=$3
+ [ "x$duration" == "x" ] && duration=${NOTIFY_DURATION}
+ duration=$(( $duration / 1000 )) # kdialog duration is in second
+ cmd="/usr/bin/kdialog --passivepopup \"$1\" --title \"EeePC $EEEPC_MODEL\" $duration"
+ send_generic "${cmd}"
+}
+
+### dzen ########################################################
+function send_dzen() {
+ if [ ! -e /usr/bin/dzen2 ]; then
+ logger "To use dzen's OSD, please install 'dzen2'"
+ echo "To use dzen's OSD, please install 'dzen2'"
+ return 1
+ fi
+ duration=$3
+ [ "x$duration" == "x" ] && duration=${NOTIFY_DURATION}
+ duration=$(( $duration / 1000 )) # Dzen2 duration is in second
+ cmd="(echo \"$1\"; sleep $duration) | /usr/bin/dzen2 &"
+ send_generic "${cmd}"
+}
+
+### awesome / nayghty ###########################################
+function send_naughty() {
+ if [ ! -e /usr/bin/awesome-client ]; then
+ logger "To use awesome's OSD, please install 'awesome'"
+ echo "To use awesome's OSD, please install 'awesome'"
+ return 1
+ fi
+ duration=$3
+ [ "x$duration" == "x" ] && duration=${NOTIFY_DURATION}
+ duration=$(( $duration / 1000 )) # naughty duration is in second
+ cmd="echo 'naughty.notify({title = \"EeePC $EEEPC_MODEL\", text = \"$1\", timeout = $duration})' | awesome-client - &"
+ send_generic "${cmd}"
+}
+
+### Make sure GUI is run as user ################################
+function send_generic() {
+ if [ "x$UID" == "x0" ]; then
+ # Verify if GDM is running
+ # See http://code.google.com/p/acpi-eeepc-generic/issues/detail?id=62
+ #pkill -0 gdm
+ #GDM_RUNNING=$?
+ #if [ "x$GDM_RUNNING" == "x0" ]; then
+ # eval "${@}"
+ #else
+ # /bin/su $user --login -c "${@}"
+ #fi
+ #export XAUTHORITY=${XAUTHORITY-/home/$user/.Xauthority}
+ /bin/su $user -c "${@}"
+ else
+ #bash -c "${@}"
+ eval "${@}"
+ fi
+}
+
+### Print all commands in an array ##############################
+function print_commands() {
+ cmds=( "$@" )
+ cmds_num=${#cmds[@]}
+ [ "$cmds_num" == "0" ] && echo "NONE"
+ for ((i=0;i<${cmds_num};i++)); do
+ c=${cmds[${i}]}
+ echo "#$(($i+1)): $c"
+ done
+}
+
+### Execute all commands in an array ############################
+function execute_commands() {
+ [ "x$EEEPC_CONF_DONE" == "xno" ] && eeepc_notify "PLEASE EDIT YOUR CONFIGURATION FILE:
+/etc/conf.d/acpi-eeepc-generic.conf" stop 20000
+ cmds=( "$@" )
+ cmds_num=${#cmds[@]}
+ for ((i=0;i<${cmds_num};i++)); do
+ c=${cmds[${i}]}
+ if [ "${c:0:1}" == "@" ]; then
+ logger "execute_commands (as user $user) #$(($i+1)): $c"
+ echo "execute_commands (as user $user) #$(($i+1)): $c"
+ /bin/su $user --login -c "${c:1} &"
+ else
+ logger "execute_commands #$(($i+1)): $c"
+ echo "execute_commands #$(($i+1)): $c"
+ eval ${c}
+ fi
+ done
+}
+
+### Load modules ################################################
+function load_modules() {
+ modules=( "$@" )
+ modules_num=${#modules[@]}
+ for ((i=0;i<${modules_num};i++)); do
+ m=${modules[${i}]}
+ # If module is not already present, load it
+ if [ "`lsmod | grep \"^${m} \"`" == "" ]; then
+ /sbin/modprobe ${m}
+ fi
+ #sleep 1
+ done
+}
+
+### Unload modules ##############################################
+function unload_modules() {
+ modules=( "$@" )
+ modules_num=${#modules[@]}
+ for ((i=0;i<${modules_num};i++)); do
+ m="${modules[${i}]}"
+ # Only the first word is the module, the rest might are options,
+ # which are irrevelant in unloading the module.
+ /sbin/modprobe -r ${m%% *}
+ #sleep 1
+ done
+}
+
+### Verify if volume is muted ###################################
+function volume_is_mute() {
+ # 1 is true, 0 is false
+ # Only check the first mixer in the list
+ # Keep only line with [on] or [off], and extract which one
+ unset output_mixers output_mixers_num is_muted on_off
+ output_mixers=(`get_output_mixers`)
+ output_mixers_num=${#output_mixers[@]}
+ on_off=`amixer get ${output_mixers[0]} | grep -e "\[on\]" -e "\[off\]" | sed -n "1 s|.*\[\(o[nf]*\)\].*|\1|pg"`
+ is_muted=0
+ # FIXME: Cleaner fix for http://code.google.com/p/acpi-eeepc-generic/issues/detail?id=53
+ [ "${on_off:0:3}" == "off" ] && is_muted=1
+ echo $is_muted
+}
+
+### Return the volume level #####################################
+function get_volume() {
+ # Only check the first mixer in the list
+ # Keep only the line containing a "%" charater. Then sed to
+ # get the number inside the [NUMBER%] pattern.
+ echo `amixer get ${ALSA_VOLUME_MIXER[0]} | grep "%" | sed "s|.*\[\([0-9]*\)%.*|\1|g"`
+}
+
+### Set the volume level ########################################
+function alsa_set_volume() {
+ # Call this function with a parameter, for example with "5%+"
+ # to raise of 5% the volume of all mixers in ALSA_VOLUME_MIXER
+ mixers_num=${#ALSA_VOLUME_MIXER[@]}
+ for ((i=0;i<${mixers_num};i++)); do
+ m="${ALSA_VOLUME_MIXER[${i}]}"
+ amixer set $m $1 &
+ done
+}
+
+### Return the mixer ############################################
+function get_output_mixers() {
+ # Get what is between single quotes from amixer's output
+ mixers=`amixer scontrols | sed "s|.*'\(.*\)',0|\1|g"`
+ i=0
+ unset output_mixers
+ for m in ${mixers}; do
+ # Skip 'Mic' or 'Boost' (to filter out 'Mic Boost')
+ # since we only look for output mixers and 'Mic Boost'
+ # is split into 'Mic' and 'Boost' by bash. Skip also 'Beep'
+ if [[ "`echo $m | grep -i -e mic -e boost -e beep`" != "" ]]; then
+ continue
+ fi
+ # If not a capture, its a playback
+ if [ "`amixer sget $m | grep -i capture`" == "" ]; then
+ output_mixers[i]=$m
+ i=$((i+1))
+ fi
+ done
+ #echo "mixers: ${mixers}"
+ #echo "nb: ${#mixers[@]}"
+ #echo "output_mixers: ${output_mixers[@]}"
+ #echo "nb: ${#output_mixers[@]} $i"
+ echo ${output_mixers[@]}
+
+ # Might be easier:
+ #amixer controls | grep -i Playback | sed "s|.*'\(.*\)'.*|\1|g" | awk '{print ""$1""}' | uniq
+}
+
+### Mute/Unmute mixers ##########################################
+function alsa_toggle_mute() {
+ unset output_mixers output_mixers_num i m action
+ output_mixers=(`get_output_mixers`)
+ output_mixers_num=${#output_mixers[@]}
+ if [[ "`volume_is_mute`" == "0" ]]; then
+ action="mute"
+ else
+ action="unmute"
+ fi
+ for ((i=0 ; i < ${output_mixers_num} ; i++)); do
+ m="${output_mixers[${i}]}"
+ amixer set $m $action
+ done
+}
+
+### Get the model name ##########################################
+function get_model() {
+ if [ -z "${EEEPC_MODEL}" ]; then
+ echo "EEEPC_MODEL=\"$(dmidecode -s system-product-name | sed 's/[ \t]*$//')\"" >> /etc/conf.d/acpi-eeepc-generic.conf
+ CPU=NONE
+ grep_cpu=`grep Celeron /proc/cpuinfo`
+ [ "x$grep_cpu" != "x" ] && CPU="Celeron"
+ grep_cpu=`grep Atom /proc/cpuinfo`
+ [ "x$grep_cpu" != "x" ] && CPU="Atom"
+ echo "EEEPC_CPU=\"$CPU\"" >> /etc/conf.d/acpi-eeepc-generic.conf
+ fi
+}
+
+### Return brightness level percentage ##########################
+function brightness_get_percentage() {
+ actual_brightness=`cat ${eee_backlight}/actual_brightness`
+ maximum_brightness=`cat ${eee_backlight}/max_brightness`
+ echo $((10000*$actual_brightness / (100*$maximum_brightness) ))
+}
+
+### Set the brightness level percentage #########################
+function brightness_set_percentage() {
+ #actual_brightness=`cat ${eee_backlight}/actual_brightness`
+ maximum_brightness=`cat ${eee_backlight}/max_brightness`
+ to_set=$(( $1 * $maximum_brightness / 100 ))
+ #echo "max = $maximum_brightness"
+ #echo "now = $actual_brightness"
+ #echo "1 = $1"
+ #echo "to set = $to_set"
+ echo $to_set > ${eee_backlight}/brightness
+}
+
+### Save brightness #############################################
+function save_brightness() {
+ cat ${eee_backlight}/brightness > ${EEEPC_VAR}/states/brightness
+}
+
+### Restore brightness ##########################################
+function restore_brightness() {
+ cat ${EEEPC_VAR}/states/brightness > ${eee_backlight}/brightness
+}
+
+### Set brightness (absolute value) #############################
+function brightness_set_absolute() {
+ echo $1 > ${eee_backlight}/brightness
+}
+
+### Get direction of brightness change ##########################
+function brightness_find_direction() {
+ actual_brightness=`cat ${eee_backlight}/actual_brightness`
+ previous_brightness=`cat ${EEEPC_VAR}/states/brightness`
+ [ "x$previous_brightness" == "x" ] && previous_brightness=$actual_brightness
+ to_return=""
+ [ $actual_brightness -lt $previous_brightness ] && to_return="down"
+ [ $actual_brightness -gt $previous_brightness ] && to_return="up"
+ echo $actual_brightness > ${EEEPC_VAR}/states/brightness
+ echo $to_return
+}
+
+### Print generic debug information #############################
+function print_generic_debug() {
+ echo "DEBUG: EeePC model: $EEEPC_MODEL ($EEEPC_CPU)"
+ echo "DEBUG: BIOS version: `dmidecode | grep -A 5 BIOS | grep Version | awk '{print ""$2""}'`"
+ echo "DEBUG: Running kernel: `uname -a`"
+ if [ -e /usr/bin/pacman ]; then
+ echo "DEBUG: Installed kernel(s):"
+ /usr/bin/pacman -Qs kernel26
+ fi
+
+ if [ ${#DRIVERS[@]} -gt 1 ]; then
+ plural="s"
+ else
+ plural=""
+ fi
+ echo "DEBUG ($0): Driver${plural}: ${DRIVERS[@]} (${#DRIVERS[@]})"
+ echo "DEBUG ($0): is enabled: ${IS_ENABLED}"
+
+ if [ "x${INTERFACE}" != "x" ]; then
+ echo "DEBUG ($0): interface: ${INTERFACE}"
+ fi
+
+ if [ "${SYS_IS_PRESENT}" == "yes" ]; then
+ echo "DEBUG ($0): /sys device: ${SYS_DEVICE}"
+ echo "DEBUG ($0): /sys state: ${SYS_STATE}"
+ else
+ echo "DEBUG ($0): /sys device is not present"
+ fi
+
+ if [ "${RFKILL_IS_PRESENT}" == "yes" ]; then
+ echo "DEBUG ($0): rfkill switch: ${RFKILL_SWITCH}"
+ echo "DEBUG ($0): rfkill state: ${RFKILL_STATE}"
+ else
+ echo "DEBUG ($0): rfkill switch is not present"
+ fi
+
+ echo "DEBUG ($0): COMMANDS_PRE_UP:"
+ print_commands "${COMMANDS_PRE_UP[@]}"
+ echo "DEBUG ($0): COMMANDS_POST_UP:"
+ print_commands "${COMMANDS_POST_UP[@]}"
+ echo "DEBUG ($0): COMMANDS_PRE_DOWN:"
+ print_commands "${COMMANDS_PRE_DOWN[@]}"
+ echo "DEBUG ($0): COMMANDS_POST_DOWN:"
+ print_commands "${COMMANDS_POST_DOWN[@]}"
+
+ if [ "x${INTERFACE}" != "x" ]; then
+ interface_notify_msg="
+interface: ${INTERFACE}"
+ fi
+
+ if [ "${SYS_IS_PRESENT}" == "yes" ]; then
+ SYS_MESSAGE="/sys device: ${SYS_DEVICE}
+/sys state: ${SYS_STATE}"
+ else
+ SYS_MESSAGE="/sys device is not present"
+ fi
+
+ if [ "${RFKILL_IS_PRESENT}" == "yes" ]; then
+ RFKILL_MESSAGE="rfkill switch: ${RFKILL_SWITCH}
+rfkill state: ${RFKILL_STATE}"
+ else
+ RFKILL_MESSAGE="rfkill switch is not present"
+ fi
+
+ eeepc_notify "${NAME}
+Driver${plural}: ${DRIVERS[@]}
+is enabled: ${IS_ENABLED} ${interface_notify_msg}
+${SYS_MESSAGE}
+${RFKILL_MESSAGE}" ${ICON} 10000
+}
+
+### Toggle the device on and off ################################
+function device_toggle {
+ if [ "${IS_ENABLED}" == "yes" ]; then
+ device_off 1
+ else
+ device_on 1
+ fi
+}
+
+### Restore a device ############################################
+function device_restore() {
+ if [ "${SAVED_STATE}" == "1" ]; then
+ device_on 1 0
+ else
+ device_off 1 0
+ fi
+}
+
+### Check /sys interface ########################################
+function check_sys_interface() {
+ SYS_DEVICE="${sys_path}/${SYS_NAME}"
+ if [ -e ${SYS_DEVICE} ]; then
+ SYS_IS_PRESENT="yes"
+ # Get sys state (0 = card off, 1 = card on)
+ SYS_STATE=$(cat ${SYS_DEVICE})
+ else
+ # Some models do not have any such device (1000HE)
+ SYS_IS_PRESENT="no"
+ SYS_STATE=""
+ fi
+}
+
+### Check rfkill switch #########################################
+function check_rfkill_switch() {
+ if [ -e ${rfkills_path} ]; then
+ # Default to the second one
+ rfkill="rfkill1"
+ for r in `/bin/ls ${rfkills_path}/`; do
+ name=`cat ${rfkills_path}/$r/name`
+ [ "$name" == "eeepc-${NAME_SMALL}" ] && rfkill=$r
+ done
+ RFKILL_IS_PRESENT="yes"
+ RFKILL_SWITCH="${rfkills_path}/${rfkill}/state"
+ # Get rfkill switch state (0 = card off, 1 = card on)
+ RFKILL_STATE=$(cat ${RFKILL_SWITCH})
+ else
+ # rfkill disabled/not present
+ RFKILL_IS_PRESENT="no"
+ RFKILL_SWITCH=""
+ RFKILL_STATE=0
+ fi
+}
+
+### Detect if card is enabled or disabled #######################
+function detect_if_enabled() {
+ if [[ "${SYS_IS_PRESENT}" == "yes" && "${RFKILL_IS_PRESENT}" == "yes" ]]; then
+ # Both are present, no problem!
+
+ # States of both should match. Else we have a problem...
+ if [[ "${SYS_STATE}" == "1" && "${RFKILL_STATE}" == "1" ]]; then
+ IS_ENABLED="yes"
+ elif [[ "${SYS_STATE}" == "0" && "${RFKILL_STATE}" == "0" ]]; then
+ IS_ENABLED="no"
+ else
+ msg="ERROR in $0: /sys interface state (${SYS_STATE}) and rfkill switch state (${RFKILL_STATE}) do not match!"
+ logger "$msg"
+ eeepc_notify "$msg" stop
+ exit 1
+ fi
+ else
+ # One of the two is not present. Just get the state of the other
+ if [[ "${SYS_IS_PRESENT}" == "yes" && "${SYS_STATE}" == "1" ]]; then
+ IS_ENABLED="yes"
+ elif [[ "${RFKILL_IS_PRESENT}" == "yes" && "${RFKILL_STATE}" == "1" ]]; then
+ IS_ENABLED="yes"
+ else
+ IS_ENABLED="no"
+ fi
+ fi
+}
+
+### Load saved state from file ##################################
+function load_saved_state() {
+ SAVED_STATE_FILE=${EEEPC_VAR}/states/${NAME_SMALL}
+ if [ -e $SAVED_STATE_FILE ]; then
+ SAVED_STATE=$(cat $SAVED_STATE_FILE)
+ else
+ SAVED_STATE=0
+ fi
+}
+
+### Turn of device ##############################################
+function device_on {
+ # First argument ($1): Number of times the funciton has been called
+ # Second argument ($2): Should we show notifications?
+
+ # Check if 2nd argument to given to function is "0" and disable
+ # notifications,
+ show_notifications=1
+ [ "$2" == "0" ] && show_notifications=0
+
+ [ "${IS_ENABLED}" == "yes" ] && \
+ eeepc_notify "${NAME} already turned on!" ${ICON} && \
+ return 0
+
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "Turning ${NAME} on..." ${ICON}
+
+ # Execute pre-up commands just once
+ [ $1 -eq 1 ] && \
+ execute_commands "${COMMANDS_PRE_UP[@]}"
+
+ # Enable rfkill switch (which might fail on less then 2.6.29)
+ if [ "${RFKILL_IS_PRESENT}" == "yes" ]; then
+ echo 1 > ${RFKILL_SWITCH}
+
+ if [ ${KERNEL_rel} -lt 29 ]; then
+ s="rfkill switch usage might fail on kernel lower than 2.6.29"
+ logger "$s"
+ echo "$s"
+ fi
+ fi
+
+ if [ "x$INTERFACE" != "x" ]; then
+ # Put interface up and wait 1 second
+ eval ${INTERFACE_UP}
+ sleep 1
+ fi
+
+ # Load module(s)
+ [ "${DRIVERS_LOAD}" != "no" ] && load_modules "${DRIVERS[@]}"
+
+ success=$?
+ if [ $success ]; then
+ # If successful, enable card
+ [ "${SYS_IS_PRESENT}" == "yes" ] && \
+ echo 1 > ${SYS_DEVICE}
+
+ # Save the card state
+ echo 1 > $SAVED_STATE_FILE
+
+ # Execute post-up commands
+ execute_commands "${COMMANDS_POST_UP[@]}"
+
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "${NAME} is now on" ${ICON}
+ else
+ # If module loading was not successful...
+
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "Could not enable ${NAME}" stop
+
+ # Try again
+ if [ $1 -lt $TOGGLE_MAX_TRY ]; then
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "Trying again in 2 second ($(($1+1)) / $TOGGLE_MAX_TRY)" ${ICON}
+ sleep 2
+ device_on $(($1+1)) $show_notifications
+ fi
+ fi
+}
+
+### Turn off device #############################################
+function device_off {
+ # First argument ($1): Number of times the funciton has been called
+ # Second argument ($2): Should we show notifications?
+
+ # Check if 2nd argument given to function is "0" and disable
+ # notifications.
+ show_notifications=1
+ [ "$2" == "0" ] && show_notifications=0
+
+ [ "${IS_ENABLED}" == "no" ] && \
+ eeepc_notify "${NAME} already turned off!" ${ICON} && \
+ return 0
+
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "Turning ${NAME} off..." ${ICON}
+
+ # Execute pre-down commands just once
+ [ $1 -eq 1 ] && \
+ execute_commands "${COMMANDS_PRE_DOWN[@]}"
+
+ if [ "x$INTERFACE" != "x" ]; then
+ # Put interface down and wait 1 second
+ eval ${INTERFACE_DOWN}
+ sleep 1
+ fi
+
+ if [ "${RFKILL_IS_PRESENT}" == "yes" ]; then
+ # If rfkill switch exists
+
+ # Disable the card via rfkill switch
+ echo 0 > ${RFKILL_SWITCH}
+
+ if [ ${KERNEL_rel} -lt 29 ]; then
+ s="rfkill switch usage might fail on kernel lower than 2.6.29"
+ logger "$s"
+ echo "$s"
+ fi
+ fi
+
+ # If /sys device exists, disable it too
+ [ "${SYS_IS_PRESENT}" == "yes" ] && \
+ echo 0 > ${SYS_DEVICE}
+
+ # Save the card states
+ echo 0 > $SAVED_STATE_FILE
+
+ # Unload module(s)
+ [ "${DRIVERS_UNLOAD}" != "no" ] && unload_modules "${DRIVERS[@]}"
+
+ # Execute post-down commands
+ execute_commands "${COMMANDS_POST_DOWN[@]}"
+
+ [ "$show_notifications" == "1" ] && \
+ eeepc_notify "${NAME} is now off" ${ICON}
+}
+
+### Block suspend if certain programs are running ###############
+function suspend_check_blacklisted_processes() {
+ processes=( "$@" )
+ p_num=${#processes[@]}
+ logger "Checking for processes before suspending: $processes ($p_num)"
+ for ((i=0;i<${p_num};i++)); do
+ p=${processes[${i}]}
+ pid=`pidof $p`
+ logger "process #$i: $p ($pid)"
+ echo "process #$i: $p ($pid)"
+ if [ "x$pid" != "x" ]; then
+ echo "$p is running! Canceling suspend"
+ logger "$p is running! Canceling suspend"
+ eeepc_notify "$p is running! Canceling suspend" stop 5000
+ exit 0
+ fi
+ done
+}
+
+### Get username ################################################
+if [ -S /tmp/.X11-unix/X0 ]; then
+ export DISPLAY=:0
+
+ # Detect logged in user by using "who"
+ user=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
+ # If there is a space in $user, autodetection failed, so clear it.
+ [ "x`echo $user | grep ' '`" != "x" ] && user=""
+
+ # If autodetection fails, try another way...
+ # Take first reported by "who"
+ #[ "x$user" == "x" ] && user=$(who | head -1 | awk '{print $1}')
+ # If there is a space in $user, autodetection failed, so clear it.
+ #[ "x`echo $user | grep ' '`" != "x" ] && user=""
+
+ # If autodetection fails, try another way...
+ # Take users reported by "who" and return uniq values
+ [ "x$user" == "x" ] && user=$(who | awk '{print $1}' | uniq)
+ # If there is a space in $user, autodetection failed, so clear it.
+ [ "x`echo $user | grep ' '`" != "x" ] && user=""
+
+ # If autodetection fails, try another way...
+ # Get user who executed startx. Might not work if a login
+ # manager (GDM,KDM,etc.) is used.
+ [ "x$user" == "x" ] && user=$(ps aux | grep '[x]init /home' | awk '{print $1}' | head -1)
+ # If there is a space in $user, autodetection failed, so clear it.
+ [ "x`echo $user | grep ' '`" != "x" ] && user=""
+
+ # If autodetection fails, fallback to default user
+ # set in /etc/conf.d/acpi-eeepc-generic.conf
+ [ "x$user" == "x" ] && user=$XUSER
+
+ # As a last resort, check all processes and their owning user,
+ # filtering known users.
+ [ "x$user" == "x" ] && user=$(ps aux | awk '{print ""$1""}' | \
+ sort | uniq | \
+ grep -v \
+ -e avahi -e bin -e dbus -e ftp-e hal -e nobody \
+ -e ntp -e nx -e policykit -e privoxy -e root \
+ -e tor -e USER
+ )
+ # If there is a space in $user, autodetection failed, so clear it.
+ [ "x`echo $user | grep ' '`" != "x" ] && user=""
+
+ # If user is _still_ empty, notify the user to set XUSER in
+ # configuration file.
+ [ "x$user" == "x" ] && \
+ eeepc_notify "User autodetection failed. Please edit \
+your configuration file (/etc/conf.d/acpi-eeepc-generic.conf) \
+and set XUSER variable to your username." stop 20000
+
+ # If user is detected correctly (not empty), set variables
+ # accordingly.
+ if [ "x$user" != "x" ]; then
+ home=$(getent passwd $user | cut -d: -f6)
+ fi
+ # If XAUTHORITY is not set, put a default value of
+ # $home/.Xauthority. Else, take that value.
+ XAUTHORITY=${XAUTHORITY:-$home/.Xauthority}
+ [ -f $XAUTHORITY ] && export XAUTHORITY
+fi
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic-handler.sh b/acpi-eeepc-generic-handler.sh
new file mode 100644
index 00000000000..e3734617a15
--- /dev/null
+++ b/acpi-eeepc-generic-handler.sh
@@ -0,0 +1,288 @@
+#!/bin/sh
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+get_model
+. /etc/acpi/eeepc/models/acpi-eeepc-defaults-events.conf
+. /etc/acpi/eeepc/models/acpi-eeepc-$EEEPC_MODEL-events.conf
+
+SELECTION=$3
+if [ "$KEY_SHOW" = "1" ]; then
+eeepc_notify "The event of the pressed key is: \"$SELECTION\"" keyboard 20000
+fi
+
+case "$1" in
+
+ battery|processor)
+ # Don't do anything
+ ;;
+
+ ac_adapter)
+ case "$4" in
+ 00000000) # AC unplugged
+ # These events are generated twice (at least on the 1000)
+ # Make sure the commands are executed only once
+ if [ ! -e ${EEEPC_VAR}/ac_event_unplugged ]; then
+ touch ${EEEPC_VAR}/ac_event_unplugged
+ # Wait 5 seconds (in background) before deleting the file
+ echo `sleep 5 && rm -f ${EEEPC_VAR}/ac_event_unplugged` &
+ execute_commands "${COMMANDS_AC_UNPLUGGED[@]}"
+ fi
+ ;;
+ 00000001) # AC plugged-in
+ # These events are generated twice (at least on the 1000)
+ # Make sure the commands are executed only once
+ if [ ! -e ${EEEPC_VAR}/ac_event_plugged ]; then
+ touch ${EEEPC_VAR}/ac_event_plugged
+ # Wait 5 seconds (in background) before deleting the file
+ echo `sleep 5 && rm -f ${EEEPC_VAR}/ac_event_plugged` &
+ execute_commands "${COMMANDS_AC_PLUGGED[@]}"
+ fi
+ ;;
+ *)
+ msg="acpi-eeepc-generic-handler: undefined 'ac_adapter' event: $2 $3 $4"
+ logger "$msg"
+ ;;
+ esac
+ ;;
+
+ button/power)
+ case "$2" in
+ PWRF|PBTN)
+ eeepc_notify "Power button pressed" gnome-session-halt
+ execute_commands "${COMMANDS_POWER_BUTTON[@]}"
+ ;;
+ *)
+ msg="acpi-eeepc-generic-handler: undefined 'button/power' event: $2 $3 $4"
+ eeepc_notify "$msg" keyboard
+ ;;
+ esac
+ ;;
+
+ button/sleep)
+ case "$2" in
+ SLPB|SBTN)
+ suspend_check_blacklisted_processes "${SUSPEND_BLACKLISTED_PROCESSES[@]}"
+ if [ -e "${EEEPC_VAR}/power.lock" ]; then
+ msg="Suspend lock exist, canceling suspend"
+ logger "$msg (${EEEPC_VAR}/power.lock)"
+ eeepc_notify "$msg" stop 5000
+ exit 0
+ fi
+ eeepc_notify "Sleep button pressed" gnome-session-suspend
+ execute_commands "${COMMANDS_SLEEP[@]}"
+ ;;
+ *)
+ msg="acpi-eeepc-generic-handler: undefined 'button/sleep' event: $2 $3 $4"
+ eeepc_notify "$msg" keyboard
+ ;;
+ esac
+ ;;
+
+ button/lid)
+ # Detect correctly lid state
+ lidstate=""
+ # /proc/acpi is deprecated
+ [ -e /proc/acpi/button/lid/LID/state ] && \
+ lidstate=$(cat /proc/acpi/button/lid/LID/state | awk '{print $2}')
+ [ "x$lidstate" == "x" ] && \
+ [ "x$3" != "x" ] && lidstate=$3 # Use event given (2rd argument) to acpid
+ # FIXME: It seems there is no /sys inteface to replace this
+ # old /proc/acpi interface, so the latter is not deprecated...
+
+ case "$lidstate" in
+ open)
+ xset dpms force on # Screen on
+ restore_brightness # Restore brightness
+ ;;
+ closed)
+ save_brightness # Save brightness
+ if [ "$COMMANDS_ON_LID_CLOSE" == "yes" ]; then
+ state_file1="/proc/acpi/ac_adapter/AC0/state"
+ state_file2="/sys/class/power_supply/AC0/online"
+ # /proc/acpi/* is deprecated
+ [ -e $state_file1 ] && ac_state=$(cat $state_file1 | awk '{print $2}' )
+ # /sys is the future
+ [ -e $state_file2 ] && ac_state=$(cat $state_file2)
+
+ case $ac_state in
+ 1|on-line)
+ # AC adapter plugged in
+ execute_commands "${COMMANDS_LID_CLOSE_ON_AC[@]}"
+ ;;
+ 0|off-line)
+ # Battery powered
+ execute_commands "${COMMANDS_LID_CLOSE_ON_BATTERY[@]}"
+ ;;
+ esac
+ fi
+ ;;
+ *)
+ msg="acpi-eeepc-generic-handler: undefined 'button/lid' event: $2 $3 $4"
+ eeepc_notify "$msg" keyboard
+ ;;
+ esac
+ ;;
+ hotkey)
+ case "$3" in
+ $EEEPC_BLANK) # Silver function button 1 (Blank)
+ logger "acpi-eeepc-generic-handler: (hotkey): Silver function button (Blank)"
+ execute_commands "${COMMANDS_BUTTON_BLANK[@]}"
+ ;;
+ $EEEPC_RESOLUTION) # Silver function button 2 (Resolution)
+ logger "acpi-eeepc-generic-handler: (hotkey): Silver function button (Resolution)"
+ execute_commands "${COMMANDS_BUTTON_RESOLUTION[@]}"
+ ;;
+ $EEEPC_USER1) # Silver function button 3 (User1)
+ logger "acpi-eeepc-generic-handler: (hotkey): Silver function button (User1)"
+ execute_commands "${COMMANDS_BUTTON_USER1[@]}"
+ ;;
+ $EEEPC_USER2) # Silver function button 4 (User2)
+ logger "acpi-eeepc-generic-handler: (hotkey): Silver function button (User2)"
+ execute_commands "${COMMANDS_BUTTON_USER2[@]}"
+ ;;
+ $EEEPC_SHE_TOGGLE) # Super Hybrid Engine
+ logger "acpi-eeepc-generic-handler: (hotkey): SHE"
+ execute_commands "${COMMANDS_SHE_TOGGLE[@]}"
+ ;;
+
+ $EEEPC_SLEEP)
+ suspend_check_blacklisted_processes "${SUSPEND_BLACKLISTED_PROCESSES[@]}"
+ logger "acpi-eeepc-generic-handler: (hotkey): Sleep"
+ eeepc_notify "Going to sleep..." gnome-session-suspend
+ execute_commands "${COMMANDS_SLEEP[@]}"
+ ;;
+ $EEEPC_WIFI_TOGGLE) # WiFi Toggle
+ logger "acpi-eeepc-generic-handler: (hotkey): WiFi toggle"
+ execute_commands "${COMMANDS_WIFI_TOGGLE[@]}"
+ ;;
+ $EEEPC_WIFI_UP) # WiFi Up
+ logger "acpi-eeepc-generic-handler: (hotkey): WiFi Up"
+ execute_commands "${COMMANDS_WIFI_UP[@]}"
+ ;;
+ $EEEPC_WIFI_DOWN) # WiFi Down
+ logger "acpi-eeepc-generic-handler: (hotkey): WiFi Down"
+ execute_commands "${COMMANDS_WIFI_DOWN[@]}"
+ ;;
+ $EEEPC_TOUCHPAD_TOGGLE) # Toggle touchpad
+ logger "acpi-eeepc-generic-handler: (hotkey): Toggling touchpad"
+ execute_commands "${COMMANDS_TOUCHPAD_TOGGLE[@]}"
+ ;;
+ $EEEPC_RESOLUTION) # Change resolution
+ logger "acpi-eeepc-generic-handler: (hotkey): Changing resolution"
+ execute_commands "${COMMANDS_RESOLUTION[@]}"
+ ;;
+ $EEEPC_ROTATE) # Rotate screen.
+ logger "acpi-eeepc-generic-handler: (hotkey): Rotate"
+ execute_commands "${COMMANDS_ROTATE_TOGGLE[@]}"
+ ;;
+ $EEEPC_BRIGHTNESS_UP|$EEEPC_BRIGHTNESS_DOWN) # Brightness
+ brightness_direction=`brightness_find_direction`
+ if [ "$brightness_direction" == "up" ]; then
+ execute_commands "${COMMANDS_BRIGHTNESS_UP[@]}"
+ brightness_percentage=`brightness_get_percentage`
+ [ "$brightness_percentage" != "100" ] && logger "acpi-eeepc-generic-handler: (hotkey): Brightness Up ($brightness_percentage%)"
+ #[ "$brightness_percentage" != "100" ] && eeepc_notify "Brightness Up ($brightness_percentage%)" dialog-information
+ elif [ "$brightness_direction" == "down" ]; then
+ execute_commands "${COMMANDS_BRIGHTNESS_DOWN[@]}"
+ brightness_percentage=`brightness_get_percentage`
+ [ "$brightness_percentage" != "0" ] && logger "acpi-eeepc-generic-handler: (hotkey): Brightness Down ($brightness_percentage%)"
+ #[ "$brightness_percentage" != "0" ] && eeepc_notify "Brightness Down ($brightness_percentage%)" dialog-information
+ fi
+ ;;
+ $EEEPC_SCREEN_OFF) # Turn off screen
+ execute_commands "${COMMANDS_SCREEN_OFF[@]}"
+ eeepc_notify "Turning screen off..." dialog-information
+ ;;
+ $EEEPC_XRANDR_TOGGLE) # RandR
+ execute_commands "${COMMANDS_XRANDR_TOGGLE[@]}"
+ eeepc_notify "Toggling displays..." video-display
+ ;;
+ $EEEPC_XRANDR_TOGGLE_0) # RandR
+ execute_commands "${COMMANDS_XRANDR_TOGGLE[@]}"
+ eeepc_notify "Toggling displays..." video-display
+ ;;
+ $EEEPC_XRANDR_TOGGLE_1) # RandR
+ execute_commands "${COMMANDS_XRANDR_TOGGLE[@]}"
+ eeepc_notify "Toggling displays..." video-display
+ ;;
+ $EEEPC_XRANDR_TOGGLE_2) # RandR
+ execute_commands "${COMMANDS_XRANDR_TOGGLE[@]}"
+ eeepc_notify "Toggling displays..." video-display
+ ;;
+ $EEEPC_TASKMAN) # Task Manager
+ logger "acpi-eeepc-generic-handler: (hotkey): Task Manager"
+ execute_commands "${COMMANDS_TASKM[@]}"
+ ;;
+ $EEEPC_VOL_MUTE) # Mute
+ logger "acpi-eeepc-generic-handler: (hotkey): Mute"
+ execute_commands "${COMMANDS_MUTE[@]}"
+ if [ "`volume_is_mute`" == "1" ]; then
+ volume_icon="audio-volume-muted"
+ mute_toggle=""
+ elif [ "`volume_is_mute`" == "0" ]; then
+ volume_icon="audio-volume-medium"
+ mute_toggle="Un"
+ fi
+ eeepc_notify "${mute_toggle}Mute (`get_volume`%)" $volume_icon
+ ;;
+ $EEEPC_VOL_DOWN) # Volume Down
+ if [ "`volume_is_mute`" == "1" ]; then
+ volume_icon="audio-volume-muted"
+ elif [ "`volume_is_mute`" == "0" ]; then
+ volume_icon="audio-volume-low"
+ fi
+ if [ "`get_volume`" != "0" ]; then
+ execute_commands "${COMMANDS_VOLUME_DOWN[@]}"
+ eeepc_notify "Volume Down (`get_volume`%)" $volume_icon
+ fi
+ ;;
+ $EEEPC_VOL_UP) # Volume Up
+ if [ "`volume_is_mute`" == "1" ]; then
+ volume_icon="audio-volume-muted"
+ elif [ "`volume_is_mute`" == "0" ]; then
+ volume_icon="audio-volume-high"
+ fi
+ if [ "`get_volume`" != "100" ]; then
+ execute_commands "${COMMANDS_VOLUME_UP[@]}"
+ eeepc_notify "Volume Up (`get_volume`%)" $volume_icon
+ fi
+ ;;
+ 00000050|00000051) # AC is plugged-in or unplugged
+ # Don't do anything, should be handled in ac_adapter group
+ ;;
+# 00000052) # battery level critical
+# logger "Battery is critical, suspending"
+# $BATTERY_CRITICAL &
+# ;;
+ *)
+ msg="Hotkey (hotkey) undefined: $2 $3 $4"
+ eeepc_notify "$msg" keyboard
+ ;;
+ esac
+ ;;
+ *)
+ if [ "$NOTIFY_IGNORE_UNKNOWN" != "yes" ]; then
+ msg="acpi-eeepc-generic-handler: undefined group/action ($1) event: $2 $3 $4"
+ eeepc_notify "$msg" keyboard
+ logger "$msg"
+ fi
+ ;;
+esac
+
diff --git a/acpi-eeepc-generic-logsbackup.rcd b/acpi-eeepc-generic-logsbackup.rcd
new file mode 100644
index 00000000000..bd81fa6c8e6
--- /dev/null
+++ b/acpi-eeepc-generic-logsbackup.rcd
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+now=`date +"%Y%m%d_%Hh%m"`
+
+# Load configuration
+. /etc/conf.d/acpi-eeepc-generic.conf
+
+case "$1" in
+ stop)
+ [ ! -d "${LOGSBACKUP_FOLDER}" ] && mkdir -p "${LOGSBACKUP_FOLDER}"
+ tar -zcf "${LOGSBACKUP_FOLDER}/$now.tar.gz" /var/log/*
+ ;;
+ start)
+ ;;
+ *)
+ echo 'Usage: /etc/rc.d/logsbackup {start||stop}'
+ exit 1
+ ;;
+esac
diff --git a/acpi-eeepc-generic-restore.rcd b/acpi-eeepc-generic-restore.rcd
new file mode 100644
index 00000000000..d22aea1a1e0
--- /dev/null
+++ b/acpi-eeepc-generic-restore.rcd
@@ -0,0 +1,70 @@
+#!/bin/sh
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+case "$1" in
+ restart|restore|reload|force-reload|start)
+
+ if [ "$RESTORE_BLUETOOTH" = "1" ]; then
+ if [ -e "$EEEPC_VAR/states/bluetooth" ]; then
+ stat_busy "Restoring EeePC state (bluetooth)..."
+ /etc/acpi/eeepc/acpi-eeepc-generic-toggle-bluetooth.sh restore &> /dev/null
+ stat_done
+ fi
+ fi
+
+ if [ "$RESTORE_BRIGHTNESS" = "1" ]; then
+ if [ -e "$EEEPC_VAR/states/brightness" ]; then
+ stat_busy "Restoring EeePC state (brightness)..."
+ restore_brightness
+ stat_done
+ fi
+ fi
+
+ if [ "$RESTORE_TOUCHPAD" = "1" ]; then
+ if [ -e "$EEEPC_VAR/states/touchpad" ]; then
+ stat_busy "Restoring EeePC state (touchpad)..."
+ /etc/acpi/eeepc/acpi-eeepc-generic-toggle-touchpad.sh restore
+ stat_done
+ fi
+ fi
+
+ if [ "$RESTORE_WIFI" = "1" ]; then
+ if [ -e "$EEEPC_VAR/states/wlan" ]; then
+ stat_busy "Restoring EeePC state (wifi)..."
+ /etc/acpi/eeepc/acpi-eeepc-generic-toggle-wifi.sh restore
+ stat_done
+ fi
+ fi
+
+ ;;
+
+ stop)
+ ;;
+ *)
+ echo "usage: $0 {start}"
+ ;;
+esac
+
+
+exit 0
+
diff --git a/acpi-eeepc-generic-rotate-lvds.sh b/acpi-eeepc-generic-rotate-lvds.sh
new file mode 100644
index 00000000000..11e451ca040
--- /dev/null
+++ b/acpi-eeepc-generic-rotate-lvds.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+#
+# LVDS Rotate
+# Andrew Wyatt
+# Tool to rotate LVDS panel
+#
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+var_xrandr="$EEEPC_VAR/xrandr.log"
+xrandr > $var_xrandr
+
+name_lvds=$(grep -i connected $var_xrandr | grep -i lvds | awk '{print ""$1""}')
+
+function rotate_toggle {
+ CURRENT=`xrandr | grep LVDS | awk '{print $4}'`
+ if [ "$CURRENT" = "right" ]; then
+ ROTATION="inverted"
+ elif [ "$CURRENT" = "inverted" ]; then
+ ROTATION="left"
+ elif [ "$CURRENT" = "left" ]; then
+ ROTATION="normal"
+ else
+ ROTATION="right"
+ fi
+ if [ "$ROTATION" ]; then
+ rotate_lvds "$ROTATION"
+ echo "$ROTATION" > $EEEPC_VAR/rotation_saved
+ fi
+}
+
+function restore_rotation {
+ if [ -e "$EEEPC_VAR/rotation_saved" ]; then
+ ROTATION=$(cat $EEEPC_VAR/rotation_saved)
+ rotate_lvds "$ROTATION"
+ fi
+}
+
+function rotate_lvds {
+ eeepc_notify "Rotate LCD \"$1\"" screen
+ xrandr --output ${name_lvds} --rotate "$1"
+}
+
+case $1 in
+ inverted)
+ rotate_lvds inverted
+ ;;
+ left)
+ rotate_lvds left
+ ;;
+ right)
+ rotate_lvds right
+ ;;
+ normal)
+ rotate_lvds normal
+ ;;
+ restore)
+ restore_rotation
+ ;;
+ *)
+ rotate_toggle
+ ;;
+esac
+
diff --git a/acpi-eeepc-generic-suspend2ram.sh b/acpi-eeepc-generic-suspend2ram.sh
new file mode 100644
index 00000000000..78f10487534
--- /dev/null
+++ b/acpi-eeepc-generic-suspend2ram.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+logger "#############################################"
+logger "acpi-eeepc-generic-suspend2ram.sh:"
+
+if [ -e "${EEEPC_VAR}/power.lock" ]; then
+ msg="Suspend lock exist, canceling suspend"
+ logger "$msg (${EEEPC_VAR}/power.lock)"
+ eeepc_notify "$msg" stop 5000
+ exit 0
+fi
+
+vga_is_on=`xrandr | grep -A 1 VGA | grep "*"`
+if [ "x$vga_is_on" != "x" ]; then
+ msg="VGA is up and running, canceling suspend"
+ logger $msg
+ eeepc_notify "$msg" stop 5000
+ exit 0
+fi
+
+if grep -q mem /sys/power/state ; then
+
+ # BEGIN SUSPEND SEQUENCE
+
+ logger "Start suspend sequence"
+
+ if [[ "$SUSPEND_QUIRKS_VTSWITCH" == "yes" ]]; then
+ # Get console number
+ CONSOLE_NUMBER=$(fgconsole)
+ logger "Saving console number: $CONSOLE_NUMBER"
+
+ # Turn off external monitor
+ var_xrandr="$EEEPC_VAR/xrandr.log"
+ xrandr > $var_xrandr
+ name_lvds=$(grep -i connected $var_xrandr | grep -i lvds | awk '{print ""$1""}')
+ if [ "x`grep " connected " $var_xrandr | awk '{print ""$1""}' | grep -i VGA`" != "x" ]; then
+ name_vga=$(grep -i connected $var_xrandr | grep -i vga | awk '{print ""$1""}')
+ xrandr --output ${name_lvds} --preferred --output ${name_vga} --off
+ fi
+
+ # Change virtual terminal to not screw up X
+ chvt 1
+ fi
+
+ # Save logs
+ /etc/rc.d/logsbackup stop
+
+ # Flush disk buffers
+ sync
+
+ # Suspend
+ execute_commands "${SUSPEND2RAM_COMMANDS[@]}"
+
+ logger "BEGIN WAKEUP SEQUENCE..."
+
+ # Restore screen
+ #/usr/sbin/vbetool post
+
+ if [[ "$SUSPEND_QUIRKS_VTSWITCH" == "yes" ]]; then
+ # Get back to screen
+ chvt $CONSOLE_NUMBER
+ fi
+
+ # Restore brightness
+ restore_brightness
+
+fi
+
+exit 0
+
diff --git a/acpi-eeepc-generic-toggle-bluetooth.sh b/acpi-eeepc-generic-toggle-bluetooth.sh
new file mode 100644
index 00000000000..b26f714f703
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-bluetooth.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+### Information for bluetooth ###################################
+DRIVERS=("${BLUETOOTH_DRIVERS[@]}")
+NAME="Bluetooth"
+NAME_SMALL="bluetooth"
+ICON=${NAME_SMALL}
+SYS_NAME="bt"
+COMMANDS_PRE_UP="${COMMANDS_BT_PRE_UP[@]}"
+COMMANDS_PRE_DOWN="${COMMANDS_BT_PRE_DOWN[@]}"
+COMMANDS_POST_UP="${COMMANDS_BT_POST_UP[@]}"
+COMMANDS_POST_DOWN="${COMMANDS_BT_POST_DOWN[@]}"
+
+### Load saved state from file ##################################
+load_saved_state
+
+### Check rfkill switch #########################################
+check_rfkill_switch
+
+### Check /sys interface
+check_sys_interface
+
+### Detect if card is enabled or disabled #######################
+detect_if_enabled
+
+#################################################################
+case $1 in
+ "debug")
+ print_generic_debug
+ ;;
+ "restore")
+ device_restore
+ ;;
+ "off")
+ device_off 1
+ ;;
+ "on")
+ device_on 1
+ ;;
+ *)
+ device_toggle
+ ;;
+esac
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic-toggle-cardr.sh b/acpi-eeepc-generic-toggle-cardr.sh
new file mode 100644
index 00000000000..d6593ee60e2
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-cardr.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+
+### Information #################################################
+DRIVERS=()
+NAME="Card Reader"
+NAME_SMALL="cardr"
+ICON="media-flash-sd-mmc"
+SYS_NAME="cardr"
+COMMANDS_PRE_UP=""
+COMMANDS_PRE_DOWN=""
+COMMANDS_POST_UP=""
+COMMANDS_POST_DOWN=""
+
+
+### Load saved state from file ##################################
+load_saved_state
+
+### Check /sys interface
+check_sys_interface
+
+### Detect if card is enabled or disabled #######################
+detect_if_enabled
+
+
+#################################################################
+case $1 in
+ "debug")
+ print_generic_debug
+ ;;
+ "restore")
+ device_restore
+ ;;
+ "off")
+ device_off 1
+ ;;
+ "on")
+ device_on 1
+ ;;
+ *)
+ device_toggle
+ ;;
+esac
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic-toggle-displays.sh b/acpi-eeepc-generic-toggle-displays.sh
new file mode 100644
index 00000000000..e0dd0f21a0d
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-displays.sh
@@ -0,0 +1,253 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+#
+# Toggle between available displays using xrandr
+#
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+xrandr=`which xrandr`
+if [ ! -e "$xrandr" ]; then
+ msg="Please install xorg-server-utils to be able
+to use xrandr."
+ eeepc_notify "$msg" display
+ logger "$msg"
+ echo "$msg"
+ exit 0
+fi
+
+var_xrandr="$EEEPC_VAR/xrandr.log"
+xrandr > $var_xrandr
+
+current=$(grep -B 1 "*" $var_xrandr | head -n 1 | awk '{print ""$1""}')
+
+connected=$(grep " connected " $var_xrandr | awk '{print ""$1""}')
+disconnected=$(grep " disconnected " $var_xrandr | awk '{print ""$1""}')
+all="$connected $disconnected"
+
+name_lvds=$(grep -i connected $var_xrandr | grep -i lvds | awk '{print ""$1""}')
+name_vga=""
+
+if [ "x`echo $connected | grep -i VGA`" == "x" ]; then
+ vga_connected="no"
+else
+ vga_connected="yes"
+ name_vga=$(grep -i connected $var_xrandr | grep -i vga | awk '{print ""$1""}')
+ vga_max_res=$(grep ${name_vga} -A 1 $var_xrandr | grep -v ${name_vga} | awk '{print ""$1""}')
+fi
+lvds_max_res=$(grep ${name_lvds} -A 1 $var_xrandr | grep -v ${name_lvds} | awk '{print ""$1""}')
+
+# Define XRandR commands for each modes
+xrandr_lvds="$xrandr --output ${name_lvds} --auto --output ${name_vga} --off"
+xrandr_clone="$xrandr --output ${name_lvds} --auto --output ${name_vga} --auto"
+xrandr_vga="$xrandr --output ${name_lvds} --off --output ${name_vga} --auto"
+#xrandr_vga_and_lvds="$xrandr --output LVDS --auto --output ${name_vga} --auto --${COMMANDS_XRANDR_TOGGLE_VGA} ${name_lvds}"
+xrandr_vga_and_lvds="$xrandr --auto --output ${name_vga} --mode ${vga_max_res} --${COMMANDS_XRANDR_TOGGLE_VGA} ${name_lvds}"
+
+xrandr_lvds_name="Laptop screen only"
+xrandr_clone_name="Clone"
+xrandr_vga_name="VGA only"
+xrandr_vga_and_lvds_name="VGA (${COMMANDS_XRANDR_TOGGLE_VGA/-/ }) laptop screen"
+
+
+# Available modes and their name. Needs first to contain only LVDS.
+modes=("${xrandr_lvds}" "${xrandr_lvds_name}")
+# Now get the other available modes from the config file.
+j=2
+for ((i=0 ; i < ${#XRANDR_AVAILABLE_MODES[*]} ; i++)); do
+ mode=${XRANDR_AVAILABLE_MODES[i]}
+ case ${mode} in
+ "clone")
+ modes[j]="${xrandr_clone}"
+ modes[j+1]="${xrandr_clone_name}"
+ j=$(($j+2))
+ ;;
+ "vga")
+ modes[j]="${xrandr_vga}"
+ modes[j+1]="${xrandr_vga_name}"
+ j=$(($j+2))
+ ;;
+ "both")
+ modes[j]="${xrandr_vga_and_lvds}"
+ modes[j+1]="${xrandr_vga_and_lvds_name}"
+ j=$(($j+2))
+ ;;
+ esac
+done
+
+
+# Get the number of modes of LVDS
+lvds_nb_modes=$((`sed -n '/LVDS/,//p' $var_xrandr | wc -l` - 1))
+# What is the actual LVDS mode?
+actual_mode_lvds=`sed -n '/LVDS/,//p' $var_xrandr | grep "*" | awk '{print ""$1""}'`
+# Get the position of LVDS
+position_lvds=(`grep ${name_lvds} $var_xrandr | awk '{print ""$3""}' | sed "s|[0-9]*x[0-9]*+\(.*\)+\(.*\)|\1 \2|g"`)
+
+#################################################################
+function get_mode_index() {
+ detected_name="$1"
+ detected_i=0
+ for ((i=0 ; i < ${#modes[*]} ; i++)); do
+ if [[ "${modes[i]}" == "${detected_name}" ]]; then
+ detected_i=i
+ break
+ fi
+ done
+ # Name is detected. But we want the index of the mode command.
+ echo $(($detected_i - 1))
+}
+
+# Assume we are actually at modes[0] (LVDS only)
+m=0
+
+# If VGA is connected, check its mode, its parameters, etc.
+if [[ "$vga_connected" = "yes" ]]; then
+ #echo "VGA connected. Trying to detect which configuration..."
+
+ # Get the number of modes of VGA
+ vga_nb_modes=$((`sed -n '/VGA/,/LVDS/p' $var_xrandr | wc -l` - 2))
+ # What is the actual VGA mode?
+ actual_mode_vga=`sed -n '/VGA/,/LVDS/p' $var_xrandr | grep "*" | awk '{print ""$1""}'`
+ # Get the position of VGA
+ position_vga=(`grep VGA $var_xrandr | awk '{print ""$3""}' | sed "s|[0-9]*x[0-9]*+\(.*\)+\(.*\)|\1 \2|g"`)
+
+ # If the position is detected (and awk/sed of previous line does not
+ # return a bogus value of '(normal'), detect which mode we actually use.
+ if [ "${position_vga}" != "(normal" ]; then
+ # Detect if we are at mode clone
+ if [[ \
+ "${position_lvds[0]}" == "0" && \
+ "${position_lvds[1]}" == "0" && \
+ "${position_vga[0]}" == "0" && \
+ "${position_vga[1]}" == "0" ]]; then
+ m=`get_mode_index "${xrandr_clone_name}"`
+ # Detect if we are at mode VGA only
+ elif [ "${position_lvds}" == "(normal" ]; then
+ m=`get_mode_index "${xrandr_vga_name}"`
+ # Detect if we are at mode VGA + LVDS
+ else
+ m=`get_mode_index "${xrandr_vga_and_lvds_name}"`
+ fi
+ m=$(($m/2))
+ fi
+fi
+
+#################################################################
+function display_toggle() {
+ mc=$(($m*2)) # Index of mode's command
+ mn=$(($m*2 + 1)) # Index of mode's name
+ prev_mc=$(($m*2)) # Index of (previous) mode's command
+ prev_mn=$(($m*2 + 1)) # Index of (previous) mode's name
+ echo "Actual mode is ${modes[$mn]} (m=$m)"
+
+ if [ "$1" == "" ]; then
+ # We are at mode "m", go to next mode
+ m=$(($m + 1))
+ mc=$((mc + 2))
+ # Check for round-up
+ if [ "$mc" == "${#modes[*]}" ]; then
+ m=0
+ mc=0
+ fi
+ else
+ echo "Called with: $1"
+ m=$((`get_mode_index "$1"`/2))
+ mc=$(($m*2))
+ fi
+ mn=$(($mc + 1))
+
+ echo "Next mode will be ${modes[$mn]} (m=$m)"
+
+ xrandr_cmd="${modes[$mc]}"
+ echo "xrandr_cmd = ${xrandr_cmd}"
+# return
+
+ if [ "${prev_mc}" == "${mc}" ]; then
+ eeepc_notify "Display already in '${modes[$mn]}' mode" video-display
+ return
+ fi
+
+ # If next mode is 0 (LVDS only), we really want to go there,
+ # whatever the state of the VGA is.
+ if [ "$m" == "0" ]; then
+ eeepc_notify "Changing display mode to: ${modes[$mn]}" video-display 10000
+ execute_commands "${xrandr_cmd}"
+ else
+ # Else, we check if VGA is connected: it does not make sense
+ # to activate it if it's not present.
+ if [ "$vga_connected" == "yes" ]; then
+ eeepc_notify "Changing display mode to '${modes[$mn]}' mode" video-display 10000
+ execute_commands "${xrandr_cmd}"
+ else
+ # If VGA is not connected, don't do anything
+ eeepc_notify "VGA not connected: not going to '${modes[$mn]}' mode" video-display
+ return
+ fi
+ fi
+
+}
+
+#################################################################
+function display_debug() {
+ echo "Modes (${#modes[*]}):"
+ for ((i=0 ; i < ${#modes[*]} ; i=i+2)); do
+ echo "${modes[i+1]}: ${modes[i]}"
+ done
+
+ echo "All: ${all}"
+ echo "Connected: ${connected}"
+ echo "Disconnected: ${disconnected}"
+ echo "vga_connected = $vga_connected"
+ echo "current = $current"
+
+ echo "vga_nb_modes = $vga_nb_modes"
+ echo "lvds_nb_modes = $lvds_nb_modes"
+ echo "actual_mode_vga = $actual_mode_vga"
+ echo "actual_mode_lvds = $actual_mode_lvds"
+
+ echo "position_lvds = ${position_lvds[*]}"
+ echo "position_vga = ${position_vga[*]}"
+
+ xrandr
+
+ exit
+}
+
+#################################################################
+case $1 in
+ lvds|Lvds|LVDS)
+ display_toggle "${xrandr_lvds_name}"
+ ;;
+ clone|Clone|CLONE)
+ display_toggle "${xrandr_clone_name}"
+ ;;
+ vga|Vga|VGA)
+ display_toggle "${xrandr_vga_name}"
+ ;;
+ vga_and_lvds|both|Both|BOTH)
+ display_toggle "${xrandr_vga_and_lvds_name}"
+ ;;
+ debug|Debug|DEBUG)
+ display_debug
+ ;;
+ *)
+ display_toggle
+ ;;
+esac
+
+### End of file #################################################
diff --git a/acpi-eeepc-generic-toggle-lock-suspend.sh b/acpi-eeepc-generic-toggle-lock-suspend.sh
new file mode 100644
index 00000000000..b85b29c12b3
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-lock-suspend.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+lock="${EEEPC_VAR}/power.lock"
+
+if [ -e "$lock" ]; then
+ msg="You can now suspend normally"
+ rm -f $lock
+ logger "$msg"
+ eeepc_notify "$msg" gnome-session-suspend
+ exit 0
+else
+ msg="Suspend is now blocked"
+ touch $lock
+ logger "$msg"
+ eeepc_notify "$msg" stop
+ exit 0
+fi
+
diff --git a/acpi-eeepc-generic-toggle-resolution.sh b/acpi-eeepc-generic-toggle-resolution.sh
new file mode 100644
index 00000000000..1036095acaa
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-resolution.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+tmp_xrandr="$EEEPC_VAR/lvds-modes"
+
+if [ -e "$tmp_xrandr" ]; then
+ LVDS_XRANDR=$(cat $tmp_xrandr)
+else
+ LVDS_XRANDR=$(xrandr > $tmp_xrandr)
+fi
+
+LVDS_MODES=$(cat $tmp_xrandr | grep -F -e LVDS -A 12 | grep [0-9]x[0-9] | grep -v -e LVDS | awk '{printf $1" "}')
+LVDS_CURRENT=$(cat $tmp_xrandr | grep -F -e LVDS -A 12 | grep -F -e [0-9]x[0-9] -e "*" | awk '{print $1}')
+
+function toggle_resolution {
+ for mode in $LVDS_MODES $LVDS_MODES; do
+ if [ "$mode" = "$LVDS_CURRENT" ]; then
+ NEXT=1;
+ elif [ "$NEXT" = "1" ]; then
+ xrandr -s $mode
+ eeepc_notify "Changing resolution to \"$mode\"" video-display
+ echo $mode > $EEEPC_VAR/resolution_saved
+ exit
+ fi
+ done
+}
+
+function restore_resolution {
+ if [ -e "$EEEPC_VAR/resolution_saved" ]; then
+ RESOLUTION=$(cat $EEEPC_VAR/resolution_saved)
+ xrandr -s $RESOLUTION
+ eeepc_notify "Changing resolution back to \"$RESOLUTION\"" video-display
+ fi
+}
+
+case $1 in
+ restore)
+ restore_resolution
+ ;;
+ *)
+ toggle_resolution
+ ;;
+esac
diff --git a/acpi-eeepc-generic-toggle-she.sh b/acpi-eeepc-generic-toggle-she.sh
new file mode 100644
index 00000000000..5c20dbda95d
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-she.sh
@@ -0,0 +1,100 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+
+### Information #################################################
+DRIVERS=()
+NAME="Super Hybrid Engine"
+NAME_SMALL="she"
+ICON="cpu"
+SYS_NAME="cpufv"
+COMMANDS_PRE_UP=""
+COMMANDS_PRE_DOWN=""
+COMMANDS_POST_UP=""
+COMMANDS_POST_DOWN=""
+
+
+### Load saved state from file ##################################
+load_saved_state
+
+### Check /sys interface ########################################
+check_sys_interface
+
+### Detect if card is enabled or disabled #######################
+detect_if_enabled
+
+### Toggle Super Hybrid Engine ##################################
+# To test: ./c_speedtest -nsize 1000000 -niters 10 > 0x302_2_powersave.log
+she_names=("performance" "normal" "powersave")
+she_value_performance=("0" "0x300") # 768
+she_value_normal=( "1" "0x301") # 769
+she_value_powersave=( "2" "0x302") # 770
+
+# Find current
+she_current=`cat ${SYS_DEVICE}`
+
+if [[ "${she_current}" == "${she_value_performance[1]}" ]]; then
+ she_next=${she_value_normal[0]}
+elif [[ "${she_current}" == "${she_value_normal[1]}" ]]; then
+ she_next=${she_value_powersave[0]}
+elif [[ "${she_current}" == "${she_value_powersave[1]}" ]]; then
+ she_next=${she_value_performance[0]}
+fi
+
+function she_toggle() {
+ if [[ "${she_names[${she_current/0x30/}]}" != "${she_names[${she_next}]}" ]]; then
+ eeepc_notify "Super Hybrid Engine: Changing to ${she_names[${she_next}]}" cpu
+ echo ${she_next} > ${SYS_DEVICE} && eeepc_notify "Super Hybrid Engine: ${she_names[${she_current/0x30/}]} to ${she_names[${she_next}]}" cpu &
+ else
+ eeepc_notify "Super Hybrid Engine: Already at ${she_names[${she_next}]}" cpu
+ fi
+}
+
+#################################################################
+case $1 in
+ "debug")
+ print_generic_debug
+ ;;
+ "powersave")
+ she_next=2
+ she_toggle
+ ;;
+ "normal")
+ she_next=1
+ she_toggle
+ ;;
+ "performance")
+ she_next=0
+ she_toggle
+ ;;
+ *)
+ she_toggle
+ ;;
+esac
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic-toggle-touchpad.sh b/acpi-eeepc-generic-toggle-touchpad.sh
new file mode 100644
index 00000000000..a06f39703f5
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-touchpad.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+# 0 means off, 1 means on
+STATE_FILE="$EEEPC_VAR/states/touchpad"
+LED_FILE="${sys_path}/leds/eeepc::touchpad/brightness"
+
+if [ -e "$STATE_FILE" ]; then
+ TPSAVED=$(cat $STATE_FILE)
+fi
+
+enable=`synclient -l 2>&1`
+if [ "$enable" == "Can't access shared memory area. SHMConfig disabled?" ]; then
+ eeepc_notify "$enable" stop 10000
+ eeepc_notify "Ensure xorg.conf is properly configured." stop 10000
+ exit 1
+fi
+
+function touchpad_toggle() {
+ if [ -S /tmp/.X11-unix/X0 ]; then
+ TOUCHPAD_OFF=`synclient -l | grep TouchpadOff | awk '{print $3}'`
+ if [ "$TOUCHPAD_OFF" = "0" ]; then
+ echo 0 > $STATE_FILE
+ synclient TouchpadOff=1
+ if [ $? ]; then
+ [ -e /usr/bin/unclutter ] && unclutter -idle 2 -root &
+ # Verify if touchpad led exist before trying to turn it off
+ [[ -e "${LED_FILE}" ]] && echo 0 > ${LED_FILE}
+ eeepc_notify "Touchpad Disabled" mouse
+ else
+ eeepc_notify "Unable to disable touchpad; Ensure xorg.conf is properly configured." stop
+ fi
+ else
+ echo 1 > $STATE_FILE
+ synclient TouchpadOff=0
+ if [ $? ]; then
+ pkill unclutter
+ # Verify if touchpad led exist before trying to turn it on
+ [[ -e "${LED_FILE}" ]] && echo 1 > ${LED_FILE}
+ eeepc_notify "Touchpad Enabled" mouse
+ else
+ eeepc_notify "Unable to enable touchpad; Ensure xorg.conf is properly configured." stop
+ fi
+ fi
+ fi
+}
+
+function touchpad_restore() {
+ if [ "$TPSAVED" = "0" ]; then
+ synclient TouchpadOff=1
+ else
+ synclient TouchpadOff=0
+ fi
+}
+
+case $1 in
+ restore)
+ touchpad_restore
+ ;;
+ *)
+ touchpad_toggle
+ ;;
+esac
+
diff --git a/acpi-eeepc-generic-toggle-webcam.sh b/acpi-eeepc-generic-toggle-webcam.sh
new file mode 100644
index 00000000000..3480f673c3a
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-webcam.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+
+### Information for bluetooth ###################################
+DRIVERS=("${CAMERA_DRIVERS[@]}")
+NAME="Camera"
+NAME_SMALL="camera"
+ICON="camera-web"
+SYS_NAME="camera"
+
+### Load saved state from file ##################################
+load_saved_state
+
+### Check /sys interface
+check_sys_interface
+
+### Detect if card is enabled or disabled #######################
+detect_if_enabled
+
+#################################################################
+case $1 in
+ "debug")
+ print_generic_debug
+ ;;
+ "restore")
+ device_restore
+ ;;
+ "off")
+ device_off 1
+ ;;
+ "on")
+ device_on 1
+ ;;
+ *)
+ device_toggle
+ ;;
+esac
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic-toggle-wifi.sh b/acpi-eeepc-generic-toggle-wifi.sh
new file mode 100644
index 00000000000..f37324b6b68
--- /dev/null
+++ b/acpi-eeepc-generic-toggle-wifi.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+# http://code.google.com/p/acpi-eeepc-generic/
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+
+. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+
+# Make sure we run as root
+if [[ $EUID -ne 0 ]]; then
+ me="`dirname $0`/`basename $0`"
+ ${SUDO} "${me}" ${@}
+ exit 1
+fi
+
+
+### Information #################################################
+DRIVERS=("${WIFI_DRIVERS[@]}")
+NAME="Wifi"
+NAME_SMALL="wlan"
+ICON="gnome-dev-wavelan"
+SYS_NAME="wlan"
+COMMANDS_PRE_UP="${COMMANDS_WIFI_PRE_UP[@]}"
+COMMANDS_PRE_DOWN="${COMMANDS_WIFI_PRE_DOWN[@]}"
+COMMANDS_POST_UP="${COMMANDS_WIFI_POST_UP[@]}"
+COMMANDS_POST_DOWN="${COMMANDS_WIFI_POST_DOWN[@]}"
+
+# Get wifi interface
+INTERFACE=$(/usr/sbin/iwconfig 2>/dev/null | grep ESSID | awk '{print $1}')
+
+INTERFACE_UP="/sbin/ifconfig $INTERFACE up 2>/dev/null"
+INTERFACE_DOWN="/sbin/ifconfig $INTERFACE down 2>/dev/null"
+
+
+### Load saved state from file ##################################
+load_saved_state
+
+### Check rfkill switch #########################################
+check_rfkill_switch
+
+### Check /sys interface
+check_sys_interface
+
+### Detect if card is enabled or disabled #######################
+detect_if_enabled
+
+
+#################################################################
+case $1 in
+ "debug")
+ print_generic_debug
+ ;;
+ "restore")
+ device_restore
+ ;;
+ "off")
+ device_off 1
+ ;;
+ "on")
+ device_on 1
+ ;;
+ *)
+ device_toggle
+ ;;
+esac
+
+### End of file #################################################
+
diff --git a/acpi-eeepc-generic.conf b/acpi-eeepc-generic.conf
new file mode 100644
index 00000000000..eb07c640a28
--- /dev/null
+++ b/acpi-eeepc-generic.conf
@@ -0,0 +1,237 @@
+#
+# Configuration file for EeePC ACPI utilities
+#
+# Please edit to your liking!!!
+#
+# http://code.google.com/p/acpi-eeepc-generic/
+# http://aur.archlinux.org/packages.php?ID=23318
+#
+# Copyright 2009 Nicolas Bigaouette
+# This file is part of acpi-eeepc-generic.
+#
+# acpi-eeepc-generic 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 3 of the License, or
+# (at your option) any later version.
+#
+# acpi-eeepc-generic is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
+#
+#################################################################
+#
+# Put your username in "XUSER". It _is_ important.
+#
+# Some defaults are defined, but
+# they might not work on your system. For example, the task manager
+# used is "lxtask", which is part of the LXDE desktop environment.
+# You can install it with "pacman -S lxtask". You can use
+# something else if you want, just be sure to edit the appropriate
+# variable.
+#
+#################################################################
+# Format:
+# Format of the settings is as follow:
+# VARIABLE_NAME=("command number 1" "command number 2" "etc.")
+#
+#################################################################
+# Note that:
+# -Commands with spaces _need_ to be double-quoted
+# -You can put as many commands as you want, as in the previous example
+# -Some defaults are provided which might not work on your
+# system. Please edit as your liking. Look at
+# COMMANDS_WIFI_POST_UP for example. It uses by
+# default "wicd" for for network management. It is killed and
+# re-run to save battery. If you don't use wicd, please remove
+# it from the commands to run!!!
+# -All commands are executed as root. To execute a command as
+# yourself (not root), put @ in front of the command. This allow
+# graphical applications to work.
+# -If a key is not working, uncomment KEY_SHOW. It will show
+# you the code of the key you pressed. Then report it to me
+# with your model number.
+# -Change your wifi module. By default it uses "rt2860sta", which
+# is the one used in the 901/1000*.
+# -You can choose between different OSD:
+# libnotify: by default (GTK), you need "notification-daemon"
+# knotify: OSD used by KDE, you need "kdebase"
+# dzen: Small OSD, you need "dzen2"
+# NONE: You guessed it... none :)
+#
+#################################################################
+# Different helper script you can use:
+#
+# Rotate the screen
+# /etc/acpi/eeepc/acpi-eeepc-generic-rotate-lvds.sh
+# Suspend to ram
+# /etc/acpi/eeepc/acpi-eeepc-generic-suspend2ram.sh
+# Toggle bluetooth on and off
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-bluetooth.sh
+# Toggle between different monitors
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-displays.sh
+# Toggle a suspension lock on and off
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-lock-suspend.sh
+# Toggle card reader on and off
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-cardr.sh
+# Change between supported screen resolutions
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-resolution.sh
+# Enable or disable the touchpad (needs SHM)
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-touchpad.sh
+# Toggle webcam on and off
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-webcam.sh
+# Toggle wifi on and off
+# /etc/acpi/eeepc/acpi-eeepc-generic-toggle-wifi.sh
+#
+#################################################################
+# Different hardware states can be saved and restored when needed.
+# To restore at boot, just add "eeepc-restore" to your DAEMONS
+# array in /etc/rc.conf
+#################################################################
+
+### Fallback user to be used for X session if autodetection fails
+XUSER=
+
+### Choose what kind of notification you want. libnotify is the
+### default, but can disable it with NONE.
+NOTIFY="libnotify" # Gnome, XFCE, GTK
+#NOTIFY="kdialog" # KDE, QT
+#NOTIFY="dzen" # dwm, wmii, xmonad or any other
+#NOTIFY="naughty" # Awesome window manager
+#NOTIFY=NONE
+NOTIFY_DURATION="2000" # Duration, in ms, of the OSD
+# Uncomment to disable showing unknown keys
+NOTIFY_IGNORE_UNKNOWN="yes"
+
+### Show the ACPI key event
+#KEY_SHOW="1"
+
+### Some scripts needs to be run as root. Specify how to gain priviledges
+#SUDO="sudo"
+#SUDO="kdesu -i eee"
+SUDO="gksu" # Append "--sudo-mode" to use sudo instead of su
+
+#################################################################
+### Drivers used by this Eee. Most used are "rt2860sta", "ath9k"
+### and "iwlagn". For Madwifi, you can try this exact list:
+### "wlan_tkip" "wlan_ccmp" "ath_pci" "ath_rate_sample" "ath_hal" "wlan_scan_sta" "wlan"
+WIFI_DRIVERS=("rt2860sta")
+BLUETOOTH_DRIVERS=("bluetooth")
+CAMERA_DRIVERS=("uvcvideo")
+# Let acpi-eeepc-generic load/unload modules?
+#DRIVERS_LOAD="no" # default: yes
+#DRIVERS_UNLOAD="no" # default: yes
+
+#################################################################
+### Volume options
+ALSA_VOLUME_MIXER=("Master") # Mixer(s) to change volume
+
+#################################################################
+### Defined commands on specific key press
+### Please edit to what you want!!!
+### Some defaults are provided, but they might not work on your
+### system if you don't have the utility installed.
+
+COMMANDS_POWER_BUTTON=("/sbin/shutdown -t3 -h now")
+# Users of LXDE might consider the following:
+#COMMANDS_POWER_BUTTON=("@_LXSESSION_PID=`pidof lxsession` lxde-logout")
+# See http://code.google.com/p/acpi-eeepc-generic/issues/detail?id=26
+# and http://wiki.archlinux.org/index.php/LXDE#Shutdown_and_Reboot_from_LXDE
+
+# These are the 4 silver buttons, located above the Fn+F2 to
+# Fn+F6 on certain models and the Fn+Spacebar. The first just
+# shutdown your screen to save power. The second toggle the touchpad on and off.
+# Note the "@" in from of the two user button commands: because
+# of this, theese commands will be executed as yourself and not root.
+# The User1, User2 & User3 (when available) are executed as your username!!!
+COMMANDS_BUTTON_BLANK=("xset dpms force off")
+COMMANDS_BUTTON_RESOLUTION=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-touchpad.sh")
+COMMANDS_BUTTON_USER1=("@terminal")
+COMMANDS_BUTTON_USER2=("@pcmanfm --no-desktop")
+
+COMMANDS_SHE_TOGGLE=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-she.sh")
+
+COMMANDS_SLEEP=("/etc/acpi/eeepc/acpi-eeepc-generic-suspend2ram.sh")
+# On some models, calling the wifi toggle script can prevent the card from
+# being re-enabled. If you have that problem, just don't call the script and
+# let the BIOS dis/enable the card.
+# See http://wiki.github.com/nbigaouette/acpi-eeepc-generic/wireless
+COMMANDS_WIFI_TOGGLE=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-wifi.sh")
+COMMANDS_WIFI_UP=()
+COMMANDS_WIFI_DOWN=()
+COMMANDS_WIFI_PRE_UP=()
+#COMMANDS_WIFI_POST_UP=("/etc/rc.d/wicd start" "@wicd-client")
+#COMMANDS_WIFI_PRE_DOWN=("pkill wicd-client" "/etc/rc.d/wicd stop" "pkill wpa_supplicant" "pkill dhcpcd")
+COMMANDS_WIFI_POST_UP=()
+COMMANDS_WIFI_PRE_DOWN=()
+COMMANDS_WIFI_POST_DOWN=()
+COMMANDS_BLUETOOTH_TOGGLE=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-bluetooth.sh")
+COMMANDS_BLUETOOTH_UP=()
+COMMANDS_BLUETOOTH_DOWN=()
+COMMANDS_BLUETOOTH_PRE_UP=()
+COMMANDS_BLUETOOTH_POST_UP=()
+COMMANDS_BLUETOOTH_PRE_DOWN=()
+COMMANDS_BLUETOOTH_POST_DOWN=()
+COMMANDS_TOUCHPAD_TOGGLE=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-touchpad.sh")
+COMMANDS_RESOLUTION=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-resolution.sh")
+COMMANDS_BRIGHTNESS_DOWN=() # Brightness down controled by BIOS
+COMMANDS_BRIGHTNESS_UP=() # Brightness up controled by BIOS
+#COMMANDS_SCREEN_OFF=(/etc/acpi/eeepc/acpi-eeepc-generic-rotate-lvds.sh)
+COMMANDS_SCREEN_OFF=("${COMMANDS_BLUETOOTH_TOGGLE[@]}")
+#COMMANDS_XRANDR_TOGGLE=("@lxrandr") # Run as user (not root)
+COMMANDS_XRANDR_TOGGLE=("/etc/acpi/eeepc/acpi-eeepc-generic-toggle-displays.sh")
+COMMANDS_XRANDR_TOGGLE_VGA="above" # VGA is: right-of, left-of, above or below of LVDS
+COMMANDS_TASKM=("@lxtask")
+#COMMANDS_TASKM=("@xterm htop")
+#COMMANDS_TASKM=("@ksysguard")
+
+# If you use OSS, you can use http://ossvol.sourceforge.net/
+COMMANDS_MUTE=("alsa_toggle_mute")
+COMMANDS_VOLUME_DOWN=("alsa_set_volume 5%-")
+COMMANDS_VOLUME_UP=("alsa_set_volume 5%+")
+
+COMMANDS_AC_UNPLUGGED=()
+COMMANDS_AC_PLUGGED=()
+COMMANDS_ON_LID_CLOSE="yes"
+COMMANDS_LID_CLOSE_ON_AC=("xset dpms force off") # Just turn the backlight off
+#COMMANDS_LID_CLOSE_ON_AC=("${COMMANDS_SLEEP[@]}") # Do the same as COMMANDS_SLEEP
+COMMANDS_LID_CLOSE_ON_BATTERY=("${COMMANDS_SLEEP[@]}") # Do the same as COMMANDS_SLEEP
+
+
+#################################################################
+### Check for these processes before suspending
+SUSPEND_BLACKLISTED_PROCESSES=(vlc mplayer smplayer kmplayer skype dragon songbird-bin amarok)
+### Change the suspend commands.
+SUSPEND2RAM_COMMANDS=("echo -n \"mem\" > /sys/power/state") # Simple suspend
+#SUSPEND2RAM_COMMANDS=("pm-suspend") # Use pm-utils
+#SUSPEND_QUIRKS_VTSWITCH="yes"
+
+#################################################################
+### Display toggling options (excluding LVDS only, since you
+### need that one!). You can use any of these three, in any order.
+#XRANDR_AVAILABLE_MODES=("clone" "vga" "both")
+XRANDR_AVAILABLE_MODES=("vga" "both")
+
+#################################################################
+### Restore feature: On boot, restore different hardware states
+RESTORE_BLUETOOTH=0
+RESTORE_BRIGHTNESS=0
+RESTORE_TOUCHPAD=0
+RESTORE_WIFI=0
+
+#################################################################
+### If you mount /var/log in ram (to protect an SSD drive), you
+### might want to backup them on shutdown/suspend, just in case.
+### Add "logsbackup" to your DAEMONS array in /etc/rc.conf. You
+### can also set the folder where to send these compressed backups.
+LOGSBACKUP_FOLDER="/logs_backup"
+
+#################################################################
+### Please comment/remove the following, to prove that you edited
+### and read fully the file ;)
+### Else, you will get a 20 second warning.
+EEEPC_CONF_DONE="no"
+
diff --git a/acpi-eeepc-generic.install b/acpi-eeepc-generic.install
new file mode 100644
index 00000000000..25c3ad733ba
--- /dev/null
+++ b/acpi-eeepc-generic.install
@@ -0,0 +1,41 @@
+post_install() {
+
+ # Disable "acpid" events handling
+ [ -e /etc/acpi/events/anything ] && \
+ sed -i 's/^[^#]/#&/' /etc/acpi/events/anything
+
+ # Detect if model is not supported
+ eeepc_model=`dmidecode -s system-product-name`
+ if [[ ! -e "/etc/acpi/eeepc/models/acpi-eeepc-${eeepc_model}-events.conf" ]]; then
+ echo ">>> You're model ${eeepc_model} is not (yet) supported."
+ echo ">>> Please report it to http://github.com/nbigaouette/acpi-eeepc-generic/issues"
+ fi
+
+ #echo ">>> "
+
+ # Get the model and save it to the configuration file
+ . /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+ get_model
+
+ echo " "
+ echo ">>> Configuration is done via /etc/conf.d/acpi-eeepc-generic.conf"
+ echo ">>> Note that you will have to COMMENT-out the 'EEEPC_CONF_DONE' option."
+ echo ">>> Else you will receive an error/warning when hitting a special key!"
+ echo " "
+ echo ">>> Please restart acpid to reload actions."
+ echo "# /etc/rc.d/acpid restart"
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ echo " "
+ echo ">>> Note that the file /etc/acpi/handler.sh is now the default."
+ [ -e /etc/acpi/events/anything ] && \
+ sed -e 's/#event/event/g' -e 's/#action/action/g' -i /etc/acpi/events/anything
+ echo ">>> Please restart acpid to reload actions."
+ echo "# /etc/rc.d/acpid restart"
+}
+