2013-10-04 23:59:41 +00:00
|
|
|
#!/bin/bash
|
2013-11-07 14:49:29 +00:00
|
|
|
|
2014-06-09 21:13:34 +00:00
|
|
|
#BEFORE=`xbacklight`
|
|
|
|
#xbacklight -set 0 -time 0 -steps 1
|
|
|
|
#sleep 0.1
|
|
|
|
#xbacklight -set $BEFORE -time 0 -steps 1
|
2013-11-07 14:49:29 +00:00
|
|
|
|
2014-06-09 21:13:34 +00:00
|
|
|
#exit
|
2013-10-04 23:59:41 +00:00
|
|
|
LIGHT=/sys/class/leds/tpacpi\:\:thinklight/brightness
|
2013-10-06 17:55:14 +00:00
|
|
|
STATE=`cat $LIGHT`
|
|
|
|
INVERSE=`echo 255-$STATE | bc -l`
|
|
|
|
|
2014-06-09 21:13:34 +00:00
|
|
|
echo $INVERSE | sudo tee $LIGHT
|
2013-10-06 17:55:14 +00:00
|
|
|
sleep .1
|
2014-06-09 21:13:34 +00:00
|
|
|
echo $STATE | sudo tee $LIGHT
|
2013-10-06 17:55:14 +00:00
|
|
|
sleep .1
|
2014-09-30 21:48:26 +00:00
|
|
|
#echo $INVERSE | sudo tee $LIGHT
|
|
|
|
#sleep .1
|
|
|
|
#echo $STATE | sudo tee $LIGHT
|