#!/bin/sh

if grep -q closed /proc/acpi/button/lid/*/state; then
    sleep 3
    su nico -c "DISPLAY=:0.0 xset dpms force off"
else
    su nico -c "DISPLAY=:0.0 xset dpms force on"
fi