git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/localfs/usr/local/sbin/brightness-down
blob: 1c7c816120c36c1695a787d99184c1ffaecfa678 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

MAXBN=$(cat /sys/class/backlight/intel_backlight/max_brightness)
CURBN=$(cat /sys/class/backlight/intel_backlight/brightness)

if [ "$CURBN" -lt "$MAXBN" ]; then
  CURBN=$(( $CURBN-78 ))
  echo "$CURBN" > /sys/class/backlight/intel_backlight/brightness
  notify-send Brightness "${CURBN}/${MAXBN}" -t 200
fi