add script to turn off display when lid closed

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-07-09 17:52:05 +02:00
parent 03aceb5618
commit 6d38c15a70

12
acpi-lid-close Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
if grep -q closed /proc/acpi/button/lid/*/state; then
sleep 3
su nico -c "DISPLAY=:0.0 xset dpms force off"
# sleep 2
# su nico -c "DISPLAY=:0.0 xset dpms force off"
# sleep 2
# su nico -c "DISPLAY=:0.0 xset dpms force off"
# sleep 2
# su nico -c "DISPLAY=:0.0 xset dpms force off"
fi