mirror of
https://github.com/pgrondek/config.git
synced 2024-11-23 12:28:40 +00:00
19 lines
404 B
Bash
Executable File
19 lines
404 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
output=eDP-1
|
|
brightness=$(xrandr --verbose | grep Brightness | awk '{printf "%d", $2*100}')
|
|
|
|
echo $brightness
|
|
|
|
set_brightness() {
|
|
xrandr --output $output --brightness $(echo $1 | awk '{printf "%0.2f", $1/100}' )
|
|
}
|
|
|
|
case $BLOCK_BUTTON in
|
|
4) set_brightness $((brightness + 10 ))
|
|
;; # scroll up
|
|
|
|
5) set_brightness $((brightness - 10 ))
|
|
;; # scroll down
|
|
esac
|