#!/bin/bash while true; do clear echo "up = Screen Brightness Up" echo "down = Screen Brightness Down" echo "i = Intialize Hardware" echo "q = Quit" read -s -n1 key clear case "$key" in $'\033') read -s -n1 key; read -s -n1 key case "$key" in A) xbacklight -time 0 -steps 1 -inc 10 2>/tmp/sonybright.log ;; B) xbacklight -time 0 -steps 1 -dec 10 2>/tmp/sonybright.log ;; esac ;; i) xrandr --output LVDS --set BACKLIGHT_CONTROL native ;; q) clear exit 0 ;; esac done