#!/bin/bash
# Criado em: Ter 11/Out/2011 hs 08:09
# Last Change: 2011 Out 11 08:14:26
# vim:ft=sh:fdm=syntax:nu:
# Instituicao: none
# Proposito do script: controlar o brilho do monitor
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
# twitter: http://www.twitter.com/voyeg3r
#
# if which dont returns nothing exit
if ! NEEDED_COMMAND="$(which xbacklight)"; then
	echo "Instale primeiro o programa xbacklight"
	sleep 3; clear; exit 1
fi

usage()
{
	echo "Usage: $(basename $0) argument"
	echo "$(basename) $0 25"
	echo "$(basename) $0 valor"
}

if [[ -z "$1" ]]; then
	usage
fi

xbacklight -set $1