#!/bin/sh
set -eux

# base dir for backlight class
BASEDIR='/sys/class/backlight/'

# get the backlight handler
HANDLER="${BASEDIR}$(ls "${BASEDIR}")"

# set the new brightness value
echo 0 > "${HANDLER}/brightness" || sudo chmod 666 "${HANDLER}/brightness"
