-
Notifications
You must be signed in to change notification settings - Fork 7
/
brightnessScript
executable file
·42 lines (34 loc) · 2.15 KB
/
brightnessScript
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
#!/bin/sh
brightnessLevel=$(cat /sys/class/backlight/acpi_video0/actual_brightness)
maxBrightness=$(cat /sys/class/backlight/acpi_video0/max_brightness)
#echo $brightnessLevel
#echo $maxBrightness
color1="#F7E599'>"
color2="#F7E081'>"
color2="#F7DB68'>"
color3="#F7DB68'>"
color4="#F5CF38'>"
color5="#F5CC27'>"
color6="#F7CA16'>"
color7="#FACB0F'>"
color8="#F7C600'>"
col="<span color='"
end="</span>"
case $brightnessLevel in
0) notify-send "Brightness:" "$col$color1•$end○○○○○○○○○○○○○○○";;
1) notify-send "Brightness:" "$col$color1••$end○○○○○○○○○○○○○○";;
2) notify-send "Brightness:" "$col$color2•••$end○○○○○○○○○○○○○";;
3) notify-send "Brightness:" "$col$color2••••$end○○○○○○○○○○○○";;
4) notify-send "Brightness:" "$col$color3•••••$end○○○○○○○○○○○";;
5) notify-send "Brightness:" "$col$color3••••••$end○○○○○○○○○○";;
6) notify-send "Brightness:" "$col$color4•••••••$end○○○○○○○○○";;
7) notify-send "Brightness:" "$col$color4••••••••$end○○○○○○○○";;
8) notify-send "Brightness:" "$col$color5•••••••••$end○○○○○○○";;
9) notify-send "Brightness:" "$col$color5••••••••••$end○○○○○○";;
10) notify-send "Brightness:" "$col$color6•••••••••••$end○○○○○";;
11) notify-send "Brightness:" "$col$color6••••••••••••$end○○○○";;
12) notify-send "Brightness:" "$col$color7•••••••••••••$end○○○";;
13) notify-send "Brightness:" "$col$color7••••••••••••••$end○○";;
14) notify-send "Brightness:" "$col$color8•••••••••••••••$end○";;
15) notify-send "Brightness:" "$col$color8••••••••••••••••$end";;
esac