diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-09-10 10:41:38 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-09-10 10:41:38 +0200 |
commit | 63712843c3541afcf25bcc8f24b46de7bbc8b400 (patch) | |
tree | a9c54f91074a51314dfb48713a727498477df5a2 /x200-my.sh | |
download | courses-63712843c3541afcf25bcc8f24b46de7bbc8b400.tar.gz |
initial commit0.1-2
Diffstat (limited to 'x200-my.sh')
-rw-r--r-- | x200-my.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/x200-my.sh b/x200-my.sh new file mode 100644 index 0000000..1b72c62 --- /dev/null +++ b/x200-my.sh | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash | ||
2 | # Default acpi script that takes an entry for all actions | ||
3 | |||
4 | case "$1" in | ||
5 | button/sleep) | ||
6 | case "$2" in | ||
7 | SLPB|SBTN) | ||
8 | logger 'SleepButton pressed' | ||
9 | rc-service x200-my restart | ||
10 | ;; | ||
11 | *) | ||
12 | logger "ACPI action undefined: $2" | ||
13 | ;; | ||
14 | esac | ||
15 | ;; | ||
16 | button/lid) | ||
17 | case "$3" in | ||
18 | close) | ||
19 | logger 'LID closed' | ||
20 | ;; | ||
21 | open) | ||
22 | logger 'LID opened' | ||
23 | rc-service x200-my restart | ||
24 | ;; | ||
25 | *) | ||
26 | logger "ACPI action undefined: $3" | ||
27 | ;; | ||
28 | esac | ||
29 | ;; | ||
30 | esac | ||
31 | |||