#!/bin/sh # Increase / decrease brightness, and pops up a notification # Requires: xbacklight, a notification program such as herbe or notify-send # Usage: brightness {inc|dec} n # ksh completion # set -A complete_brightness_1 inc dec # set -A complete_brightness_2 5 #notify="notify-send" notify="herbe" pkill herbe # comment this too if not using herbe xbacklight -$1 $2 && $notify "Brightness: $(xbacklight | sed 's/\..*$//')%"