#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) /sbin/init 0
;;
lid) if grep 'open' /proc/acpi/button/lid/LID/state ; then
/usr/bin/xset -display :0 dpms force on >> /home/nathan/wtf.txt
logger "ACPI LID open"
else
/usr/bin/xset -display :0 dpms force off >> /home/nathan/wtf.txt
logger "ACPI LID closed"
fi
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac