#!/bin/sh ## Backlight controller generic: use either light or xbacklight CMD=`crcparse bl` case "$CMD" in "light") case "$1" in "-i") light -A "${2:-1%}" ;; "-d") light -U "${2:-1%}" ;; "-s") light -S "$2" ;; "-g"|"") light -G ;; "*") printf "$CMD: $1 not understood. Treating it as a direct command." light "$@" ;; esac ;; "xbacklight") case "$1" in "-i") xbacklight -inc "${2:-1}" ;; "-d") xbacklight -dec "${2:-1}" ;; "-s") xbacklight -set "$2" ;; "-g"|"") xbacklight -get ;; "*") printf "$CMD: $1 not understood. Treating it as a direct command." xbacklight "$@" ;; esac esac