#!/usr/bin/env sh if [ $(cat /proc/acpi/button/lid/LID0/state | grep -c closed) -eq 1 ]; then xrandr --output DP-0 --off else xrandr --output DP-0 --on fi