From 63712843c3541afcf25bcc8f24b46de7bbc8b400 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 10 Sep 2018 10:41:38 +0200 Subject: initial commit --- x200-my.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 x200-my.sh (limited to 'x200-my.sh') 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 @@ +#!/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 + -- cgit v1.2.3