-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
brightness_update.sh
executable file
·42 lines (41 loc) · 1.69 KB
/
brightness_update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#--------------------------------------------------------------------------
#Brightness managing function
#--------------------------------------------------------------------------
# input the needed brightness level / automatically fetch with power level and adjust the brightness
if [ $1 -gt 81 ]
then
vv=$(echo 7812 | sudo tee /sys/class/backlight/intel_backlight/brightness "7812")
espeak "Up,dating bright,ness to high performance mode" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
#--------------------------------------------------------------------------
sudo rm $vv
else if [ $1 -gt 69 ]
then
vv=$(echo 5859 | sudo tee /sys/class/backlight/intel_backlight/brightness)
espeak "Up,dating bright,ness to moderate level" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
#--------------------------------------------------------------------------
else if [ $1 -gt 39 ]
then
vv=$(echo 3906 | sudo tee /sys/class/backlight/intel_backlight/brightness)
espeak "Up,dating bright,ness to balancing mode" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
#--------------------------------------------------------------------------
else if [ $1 -lt 39 ]
then
vv=$(echo 1562 | sudo tee /sys/class/backlight/intel_backlight/brightness)
espeak "Up,dating bright,ness to power saver mode" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
#--------------------------------------------------------------------------
else
vv=$(echo 7812 | sudo tee /sys/class/backlight/intel_backlight/brightness)
fi
fi
fi
fi
#sudo rm $vv
#-----------------------------------------------------------------------------