--- /dev/null
+#!/bin/bash
+
+if [ "$(id -u)" != "0" ]; then
+ exec sudo "$0" "$@"
+fi;
+
+MAX=$(cat /sys/class/backlight/intel_backlight/max_brightness)
+CURRENT=$(cat /sys/class/backlight/intel_backlight/brightness)
+NEW=$CURRENT
+ADJ=$(( $MAX / ${2:-20} ))
+
+if [ "$1" == "max" ]; then
+ NEW=$MAX
+elif [ "$1" == "off" ]; then
+ NEW=0
+elif [ "$1" == "min" ]; then
+ NEW=1
+elif [ "$1" == "dec" ]; then
+ NEW=$(( $CURRENT - $ADJ < 1 ? 1 : $CURRENT - $ADJ ))
+else
+ NEW=$(( $CURRENT + $ADJ >= $MAX ? $MAX : $CURRENT + $ADJ ))
+fi
+
+echo $NEW > /sys/class/backlight/intel_backlight/brightness