summaryrefslogtreecommitdiffstats
path: root/brightness
blob: 859a28f579b602921b605b3d3ac44c369297b607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh
#device="/proc/acpi/video/PEGP/LCD/brightness"
device="/sys/devices/virtual/backlight/acpi_video0/brightness"
# 1 2 3
#typeset -a avl
#avl=($(head -1 $device | cut -d ' ' -f 2-))

value=$(tail -1  $device )
#index=$avl[(I)$value]


if [[ $1 = up ]];then value=$(( value+1 ));fi
if [[ $1 = down ]];then value=$(( value-1 ));fi


echo -n $value >| $device