blob: a34d9b0708f64c4234267d2d1a645f6e6f4587fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
# Default acpi script that takes an entry for all actions
case "$1" in
button/sleep)
case "$2" in
SLPB|SBTN)
logger 'SleepButton pressed'
/bin/loginctl suspend
rc-service my-x200 restart
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
button/lid)
case "$3" in
close)
/bin/loginctl suspend
logger 'LID closed'
;;
open)
logger 'LID opened'
rc-service my-x200 restart
;;
*)
logger "ACPI action undefined: $3"
;;
esac
;;
esac
|