diff options
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 | |||