summaryrefslogtreecommitdiff
path: root/extra/acpid/handler.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /extra/acpid/handler.sh
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'extra/acpid/handler.sh')
-rw-r--r--extra/acpid/handler.sh36
1 files changed, 0 insertions, 36 deletions
diff --git a/extra/acpid/handler.sh b/extra/acpid/handler.sh
deleted file mode 100644
index 412ac02..0000000
--- a/extra/acpid/handler.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# vim: set ts=4:
-#
-# This is the default ACPI handler script that is configured in
-# /etc/acpi/events/anything to be called for every ACPI event.
-# You can edit it and add your own actions; treat it as a configuration file.
-#
-PATH="/usr/share/acpid:$PATH"
-alias log='logger -t acpid'
-
-# <dev-class>:<dev-name>:<notif-value>:<sup-value>
-case "$1:$2:$3:$4" in
-
-button/power:PWRF:*)
- log 'Power button pressed'
- # Shutdown the system unless it has a lid (notebook).
- [ -e /proc/acpi/button/lid/LID ] || poweroff
-;;
-button/sleep:SLPB:*)
- log 'Sleep button pressed'
- # Suspend to RAM.
- zzz
-;;
-button/lid:*:close:*)
- log 'Lid closed'
- # Suspend to RAM if AC adapter is not connected.
- power-supply-ac || zzz
-;;
-ac_adapter:*:*:*0)
- log 'AC adapter unplugged'
- # Suspend to RAM if notebook's lid is closed.
- lid-closed && zzz
-;;
-esac
-
-exit 0