add backlight support
This commit is contained in:
parent
25376777d1
commit
d1571c5592
@ -31,10 +31,10 @@ storage df
|
||||
- [x] audio
|
||||
- [x] fix audio not changing on mute
|
||||
- [x] cpu
|
||||
- [x] brightness
|
||||
- [ ] swap
|
||||
- [ ] wifi/ethernet/bluetooth
|
||||
- [ ] external storage with mount
|
||||
- [ ] ethernet bandwith
|
||||
- [ ] brightness
|
||||
- [ ] microphone
|
||||
- [ ] nice icons as labels
|
||||
|
12
backlight
Executable file
12
backlight
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
DIR="/sys/class/backlight/"
|
||||
if [[ -d "${DIR}acpi_video0" ]]; then
|
||||
DIR="${DIR}acpi_video0"
|
||||
elif [[ -d "${DIR}intel_backlight" ]]; then
|
||||
DIR="${DIR}intel_backlight"
|
||||
fi
|
||||
cat "${DIR}/brightness" "${DIR}/max_brightness" | gawk '
|
||||
NR==1 { cbr=$1 }
|
||||
NR==2 { mbr=$1 }
|
||||
END { printf("%d%", cbr/mbr*100) }
|
||||
'
|
Reference in New Issue
Block a user