#!/usr/bin/wish -f # Sony VAIO Laptop controls # (c) 2002, Bruce Smith proc displayBright { .lab } { exec spicctrl -b [ .bright get ] } proc updatebat { } { exec spicctrl -B .bright set [ exec spicctrl -B ] .show configure -text [ exec spicctrl -p ] after 1000 updatebat } wm title . "VAIO" scale .bright -label Brightness -from 0 -to 255 -orient horizontal \ -command displayBright label .show grid .bright -row 0 -column 0 -sticky ew grid .show -row 1 -column 0 -sticky ew exec spicctrl -B .bright set [ exec spicctrl -B ] updatebat