aboutsummaryrefslogtreecommitdiff
path: root/x200-my.sh
blob: 1b72c6260149fdf25799d48be7d30f389f135258 (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
#!/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'
		rc-service x200-my restart
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    button/lid)
        case "$3" in
            close)
                logger 'LID closed'
                ;;
            open)
                logger 'LID opened'
		rc-service x200-my restart
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
        esac
        ;;
esac