mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
Added 'acpi-eeepc-generic' from [testing], with some changes suggested by Lazy which improve both performance and system integration.
This commit is contained in:
parent
047bdafb22
commit
3d1212f3d7
132
acpi-eeepc-generic/PKGBUILD
Normal file
132
acpi-eeepc-generic/PKGBUILD
Normal file
@ -0,0 +1,132 @@
|
||||
#
|
||||
# Apps Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
|
||||
|
||||
pkgname=acpi-eeepc-generic
|
||||
pkgver=1.0rc3
|
||||
pkgrel=3
|
||||
pkgdesc="ACPI scripts for EeePC netbook computers (700, 701, 900, 900A, 901, 904HD, S101, 1000, 1000H, 1000HD, 1000HE, 1005HA, 1005-HA-H, 1005PE, 1005P, 1008HA, 1201N, T91MT)"
|
||||
url="http://code.google.com/p/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"
|
||||
)
|
||||
install=$pkgname.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-1000-events.conf"
|
||||
"acpi-eeepc-1000H-events.conf"
|
||||
"acpi-eeepc-1000HD-events.conf"
|
||||
"acpi-eeepc-1000HE-events.conf"
|
||||
"acpi-eeepc-1005HA-events.conf"
|
||||
"acpi-eeepc-1005-HA-H-events.conf"
|
||||
"acpi-eeepc-1005PE-events.conf"
|
||||
"acpi-eeepc-1005P-events.conf"
|
||||
"acpi-eeepc-1008HA-events.conf"
|
||||
"acpi-eeepc-1001P-events.conf"
|
||||
"acpi-eeepc-1201N-events.conf"
|
||||
"acpi-eeepc-700-events.conf"
|
||||
"acpi-eeepc-701-events.conf"
|
||||
"acpi-eeepc-900-events.conf"
|
||||
"acpi-eeepc-900A-events.conf"
|
||||
"acpi-eeepc-901-events.conf"
|
||||
"acpi-eeepc-904HD-events.conf"
|
||||
"acpi-eeepc-S101-events.conf"
|
||||
"acpi-eeepc-T91MT-events.conf"
|
||||
"acpi-eeepc-defaults-events.conf"
|
||||
"acpi-eeepc-generic-events"
|
||||
"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"
|
||||
"bluetooth.png"
|
||||
"eee.png")
|
||||
|
||||
md5sums=('be2c9c078c781185356c775f7a785569'
|
||||
'be2c9c078c781185356c775f7a785569'
|
||||
'be2c9c078c781185356c775f7a785569'
|
||||
'8978b064b40be086942116b0c7779de6'
|
||||
'5ec8097c18e623d6ba2bff1f5a814885'
|
||||
'be56ea98b9aa016098bdab9cbb110334'
|
||||
'03c04440f12e3700592664320b9138a6'
|
||||
'03c04440f12e3700592664320b9138a6'
|
||||
'5ec8097c18e623d6ba2bff1f5a814885'
|
||||
'5ec8097c18e623d6ba2bff1f5a814885'
|
||||
'c75b95926e0ac397b0eea6e054ea9154'
|
||||
'75016dde1f414772434c2c151b159c29'
|
||||
'75016dde1f414772434c2c151b159c29'
|
||||
'ae981fe86cd99b736ba740fffbfec3e0'
|
||||
'a34fbf623a7d3e41cdf378924837dbbe'
|
||||
'0e7c2e4cdcb2894d67cb62f526ae491d'
|
||||
'533018701f2f67873396994ec364bb36'
|
||||
'ce02758525ba114f2f0ab3d5c564d4f3'
|
||||
'75bd2c42f01a6733ab5a2f7a0c15c70d'
|
||||
'323c03e32baec7eca3f360a282490cda'
|
||||
'cf253e386d7e743a3d25ec4165051521'
|
||||
'9444ff2c95380825af9f8c0c3ea65566'
|
||||
'0964588390647e98b475af0fb3f688de'
|
||||
'06137998d8ef768763bb327f8716641e'
|
||||
'7e26565bd36e2411ab998d6bcfe15f9e'
|
||||
'13c38e64dab996301f8d724342178cfc'
|
||||
'026238ef581ca0e844d3304c5df9433f'
|
||||
'3927305c811cef63ae52e803a169d7b2'
|
||||
'e956bc5d3761630f3c01b8b7df80f1d1'
|
||||
'45738315630165b45470694a67c8121d'
|
||||
'87a977662d92c640b21b97e1c705ad57'
|
||||
'12c506d5a4ae304833f22f04b5d5c1f0'
|
||||
'614647590c18eb4de123263bd7bceaa8'
|
||||
'ca53efde37b4484ca05a5a9dddde423c'
|
||||
'fb7539a926831b28050267e13394c831'
|
||||
'39f88b5f21b1249a1da04e921deeec95'
|
||||
'398fda7498fa76f7dd511dc6bfad4a9b'
|
||||
'b6e3ad05a0d6c9ed87bd0859267e86d8'
|
||||
'4d9af939dbd59121cd4bb191d340eb1c')
|
||||
|
||||
package() {
|
||||
mkdir -p $pkgdir/{etc/{acpi/{eeepc/models,events},conf.d,rc.d},usr/share/{applications,pixmaps}}
|
||||
|
||||
# Install our own handler.
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-handler.sh ${pkgdir}/etc/acpi/acpi-eeepc-generic-handler.sh
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-functions.sh ${pkgdir}/etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-events ${pkgdir}/etc/acpi/events/acpi-eeepc-generic-events
|
||||
|
||||
install -m0644 ${srcdir}/acpi-eeepc-generic.conf ${pkgdir}/etc/conf.d/acpi-eeepc-generic.conf
|
||||
|
||||
# Install events configuration files for each model.
|
||||
for f in ${srcdir}/acpi-eeepc-*-events.conf; do
|
||||
install -m0644 $f ${pkgdir}/etc/acpi/eeepc/models
|
||||
done
|
||||
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-restore.rcd ${pkgdir}/etc/rc.d/eeepc-restore
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-logsbackup.rcd ${pkgdir}/etc/rc.d/logsbackup
|
||||
|
||||
# Helper scripts.
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-rotate-lvds.sh ${pkgdir}/etc/acpi/eeepc
|
||||
install -m0755 ${srcdir}/acpi-eeepc-generic-suspend2ram.sh ${pkgdir}/etc/acpi/eeepc
|
||||
for f in ${srcdir}/acpi-eeepc-generic-toggle-*.sh; do
|
||||
install -m0755 $f ${pkgdir}/etc/acpi/eeepc
|
||||
done
|
||||
|
||||
install -m0644 ${srcdir}/eee.png ${pkgdir}/usr/share/pixmaps
|
||||
install -m0644 ${srcdir}/bluetooth.png ${pkgdir}/usr/share/pixmaps
|
||||
}
|
56
acpi-eeepc-generic/acpi-eeepc-1000-events.conf
Normal file
56
acpi-eeepc-generic/acpi-eeepc-1000-events.conf
Normal file
@ -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
|
56
acpi-eeepc-generic/acpi-eeepc-1000H-events.conf
Normal file
56
acpi-eeepc-generic/acpi-eeepc-1000H-events.conf
Normal file
@ -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
|
56
acpi-eeepc-generic/acpi-eeepc-1000HD-events.conf
Normal file
56
acpi-eeepc-generic/acpi-eeepc-1000HD-events.conf
Normal file
@ -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
|
61
acpi-eeepc-generic/acpi-eeepc-1000HE-events.conf
Normal file
61
acpi-eeepc-generic/acpi-eeepc-1000HE-events.conf
Normal file
@ -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
|
50
acpi-eeepc-generic/acpi-eeepc-1001P-events.conf
Normal file
50
acpi-eeepc-generic/acpi-eeepc-1001P-events.conf
Normal file
@ -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
|
59
acpi-eeepc-generic/acpi-eeepc-1005-HA-H-events.conf
Normal file
59
acpi-eeepc-generic/acpi-eeepc-1005-HA-H-events.conf
Normal file
@ -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
|
50
acpi-eeepc-generic/acpi-eeepc-1005HA-events.conf
Normal file
50
acpi-eeepc-generic/acpi-eeepc-1005HA-events.conf
Normal file
@ -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
|
55
acpi-eeepc-generic/acpi-eeepc-1005P-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-1005P-events.conf
Normal file
@ -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
|
55
acpi-eeepc-generic/acpi-eeepc-1005PE-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-1005PE-events.conf
Normal file
@ -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
|
50
acpi-eeepc-generic/acpi-eeepc-1008HA-events.conf
Normal file
50
acpi-eeepc-generic/acpi-eeepc-1008HA-events.conf
Normal file
@ -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
|
51
acpi-eeepc-generic/acpi-eeepc-1201N-events.conf
Normal file
51
acpi-eeepc-generic/acpi-eeepc-1201N-events.conf
Normal file
@ -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
|
55
acpi-eeepc-generic/acpi-eeepc-700-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-700-events.conf
Normal file
@ -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
|
55
acpi-eeepc-generic/acpi-eeepc-701-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-701-events.conf
Normal file
@ -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
|
55
acpi-eeepc-generic/acpi-eeepc-900-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-900-events.conf
Normal file
@ -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
|
||||
|
50
acpi-eeepc-generic/acpi-eeepc-900A-events.conf
Normal file
50
acpi-eeepc-generic/acpi-eeepc-900A-events.conf
Normal file
@ -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
|
||||
|
55
acpi-eeepc-generic/acpi-eeepc-901-events.conf
Normal file
55
acpi-eeepc-generic/acpi-eeepc-901-events.conf
Normal file
@ -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
|
||||
|
56
acpi-eeepc-generic/acpi-eeepc-904HD-events.conf
Normal file
56
acpi-eeepc-generic/acpi-eeepc-904HD-events.conf
Normal file
@ -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
|
||||
|
51
acpi-eeepc-generic/acpi-eeepc-S101-events.conf
Normal file
51
acpi-eeepc-generic/acpi-eeepc-S101-events.conf
Normal file
@ -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
|
58
acpi-eeepc-generic/acpi-eeepc-T91MT-events.conf
Normal file
58
acpi-eeepc-generic/acpi-eeepc-T91MT-events.conf
Normal file
@ -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
|
66
acpi-eeepc-generic/acpi-eeepc-defaults-events.conf
Normal file
66
acpi-eeepc-generic/acpi-eeepc-defaults-events.conf
Normal file
@ -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
|
3
acpi-eeepc-generic/acpi-eeepc-generic-events
Normal file
3
acpi-eeepc-generic/acpi-eeepc-generic-events
Normal file
@ -0,0 +1,3 @@
|
||||
event=.*
|
||||
action=/etc/acpi/acpi-eeepc-generic-handler.sh %e
|
||||
|
715
acpi-eeepc-generic/acpi-eeepc-generic-functions.sh
Normal file
715
acpi-eeepc-generic/acpi-eeepc-generic-functions.sh
Normal file
@ -0,0 +1,715 @@
|
||||
#!/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
|
||||
|
||||
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)
|
||||
# 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
|
||||
fi
|
||||
|
||||
### End of file #################################################
|
||||
|
286
acpi-eeepc-generic/acpi-eeepc-generic-handler.sh
Normal file
286
acpi-eeepc-generic/acpi-eeepc-generic-handler.sh
Normal file
@ -0,0 +1,286 @@
|
||||
#!/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
|
||||
;;
|
||||
*)
|
||||
msg="acpi-eeepc-generic-handler: undefined group/action ($1) event: $2 $3 $4"
|
||||
eeepc_notify "$msg" keyboard
|
||||
logger "$msg"
|
||||
;;
|
||||
esac
|
||||
|
35
acpi-eeepc-generic/acpi-eeepc-generic-logsbackup.rcd
Normal file
35
acpi-eeepc-generic/acpi-eeepc-generic-logsbackup.rcd
Normal file
@ -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
|
70
acpi-eeepc-generic/acpi-eeepc-generic-restore.rcd
Normal file
70
acpi-eeepc-generic/acpi-eeepc-generic-restore.rcd
Normal file
@ -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
|
||||
|
80
acpi-eeepc-generic/acpi-eeepc-generic-rotate-lvds.sh
Normal file
80
acpi-eeepc-generic/acpi-eeepc-generic-rotate-lvds.sh
Normal file
@ -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
|
||||
|
95
acpi-eeepc-generic/acpi-eeepc-generic-suspend2ram.sh
Normal file
95
acpi-eeepc-generic/acpi-eeepc-generic-suspend2ram.sh
Normal file
@ -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
|
||||
|
71
acpi-eeepc-generic/acpi-eeepc-generic-toggle-bluetooth.sh
Normal file
71
acpi-eeepc-generic/acpi-eeepc-generic-toggle-bluetooth.sh
Normal file
@ -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 #################################################
|
||||
|
71
acpi-eeepc-generic/acpi-eeepc-generic-toggle-cardr.sh
Normal file
71
acpi-eeepc-generic/acpi-eeepc-generic-toggle-cardr.sh
Normal file
@ -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 #################################################
|
||||
|
253
acpi-eeepc-generic/acpi-eeepc-generic-toggle-displays.sh
Normal file
253
acpi-eeepc-generic/acpi-eeepc-generic-toggle-displays.sh
Normal file
@ -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 #################################################
|
36
acpi-eeepc-generic/acpi-eeepc-generic-toggle-lock-suspend.sh
Normal file
36
acpi-eeepc-generic/acpi-eeepc-generic-toggle-lock-suspend.sh
Normal file
@ -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
|
||||
|
60
acpi-eeepc-generic/acpi-eeepc-generic-toggle-resolution.sh
Normal file
60
acpi-eeepc-generic/acpi-eeepc-generic-toggle-resolution.sh
Normal file
@ -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
|
100
acpi-eeepc-generic/acpi-eeepc-generic-toggle-she.sh
Normal file
100
acpi-eeepc-generic/acpi-eeepc-generic-toggle-she.sh
Normal file
@ -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: ${she_names[${she_current/0x30/}]} to ${she_names[${she_next}]}" cpu
|
||||
echo ${she_next} > ${SYS_DEVICE}
|
||||
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 #################################################
|
||||
|
83
acpi-eeepc-generic/acpi-eeepc-generic-toggle-touchpad.sh
Normal file
83
acpi-eeepc-generic/acpi-eeepc-generic-toggle-touchpad.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/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"
|
||||
|
||||
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 &
|
||||
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
|
||||
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
|
||||
|
65
acpi-eeepc-generic/acpi-eeepc-generic-toggle-webcam.sh
Normal file
65
acpi-eeepc-generic/acpi-eeepc-generic-toggle-webcam.sh
Normal file
@ -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 #################################################
|
||||
|
80
acpi-eeepc-generic/acpi-eeepc-generic-toggle-wifi.sh
Normal file
80
acpi-eeepc-generic/acpi-eeepc-generic-toggle-wifi.sh
Normal file
@ -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 #################################################
|
||||
|
235
acpi-eeepc-generic/acpi-eeepc-generic.conf
Normal file
235
acpi-eeepc-generic/acpi-eeepc-generic.conf
Normal file
@ -0,0 +1,235 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
### 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_BUTTON_BLANK[@]}")
|
||||
#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"
|
||||
|
37
acpi-eeepc-generic/acpi-eeepc-generic.install
Normal file
37
acpi-eeepc-generic/acpi-eeepc-generic.install
Normal file
@ -0,0 +1,37 @@
|
||||
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 " "
|
||||
echo ">>> To finish installation, read the initial setup wiki page:"
|
||||
echo ">>> http://wiki.github.com/nbigaouette/acpi-eeepc-generic/information-on-acpi-eeepc-generics-initial-setup"
|
||||
echo " "
|
||||
|
||||
#echo ">>> "
|
||||
|
||||
# Get the model and save it to the configuration file
|
||||
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
|
||||
get_model
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
echo " "
|
||||
echo ">>> Note that the file /etc/acpi/handler.sh is now the default."
|
||||
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"
|
||||
}
|
||||
|
BIN
acpi-eeepc-generic/bluetooth.png
Normal file
BIN
acpi-eeepc-generic/bluetooth.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
acpi-eeepc-generic/eee.png
Normal file
BIN
acpi-eeepc-generic/eee.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
Loading…
Reference in New Issue
Block a user