aboutsummaryrefslogtreecommitdiff
path: root/x200-my.sh
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-09-10 10:41:38 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-09-10 10:41:38 +0200
commit63712843c3541afcf25bcc8f24b46de7bbc8b400 (patch)
treea9c54f91074a51314dfb48713a727498477df5a2 /x200-my.sh
downloadx200-my-63712843c3541afcf25bcc8f24b46de7bbc8b400.tar.gz
initial commit0.1-2
Diffstat (limited to 'x200-my.sh')
-rw-r--r--x200-my.sh31
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
4case "$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 ;;
30esac
31