1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-22 12:03:43 +00:00

[i3] improve brightness block

This commit is contained in:
Przemysław Grondek 2019-11-12 08:33:44 +01:00
parent f6aedd07d5
commit 9afcacf0eb

View File

@ -7,13 +7,9 @@ get_brighntess() {
brightness=$(xrandr --verbose | grep Brightness | awk '{printf "%d", $2*100}') brightness=$(xrandr --verbose | grep Brightness | awk '{printf "%d", $2*100}')
} }
print_bringtness() {
get_brighntess
echo $brightness
}
set_brightness() { set_brightness() {
xrandr --output $output --brightness $(echo $1 | awk '{printf "%0.2f", $1/100}' ) xrandr --output $output --brightness $(echo $1 | awk '{printf "%0.2f", $1/100}' )
brightness=$1
} }
get_brighntess get_brighntess
@ -26,4 +22,4 @@ case $BLOCK_BUTTON in
;; # scroll down ;; # scroll down
esac esac
print_bringtness echo $brightness