summarylogtreecommitdiffstats
path: root/macbook-wakeup.service
diff options
context:
space:
mode:
authorTony Lambiris2016-12-10 23:44:11 -0500
committerTony Lambiris2016-12-10 23:44:11 -0500
commit854f450e06d8bf89aa58596ffaf1f621f3f7b679 (patch)
tree0d9145be0d30b614cad1a0b78141a516767b5746 /macbook-wakeup.service
parent46cb6a8f0d591c38e6272ada875c48b6d2f698ee (diff)
downloadaur-854f450e06d8bf89aa58596ffaf1f621f3f7b679.tar.gz
Version bump, add macbook-wakeup.service
Diffstat (limited to 'macbook-wakeup.service')
-rw-r--r--macbook-wakeup.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/macbook-wakeup.service b/macbook-wakeup.service
new file mode 100644
index 00000000000..48ac5f514dd
--- /dev/null
+++ b/macbook-wakeup.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Configure device events for linux-macbook
+ConditionPathExists=/proc/acpi/wakeup
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "awk '$1 !~ /^LID/ && $3 ~ /enabled/ {print $1}' /proc/acpi/wakeup | xargs -I{} echo '{}' > /proc/acpi/wakeup"
+ExecStart=/bin/sh -c "awk '$1 ~ /^LID/ && $3 ~ /disabled/ {print $1}' /proc/acpi/wakeup | xargs -I{} echo '{}' > /proc/acpi/wakeup"
+RemainAfterExit=yes
+TimeoutSec=0
+
+[Install]
+WantedBy=multi-user.target