From 9afcacf0eb2d0adf83980256eda722411c2321e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Tue, 12 Nov 2019 08:33:44 +0100 Subject: [PATCH] [i3] improve brightness block --- i3/i3blocks/blocks/brightness | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/i3/i3blocks/blocks/brightness b/i3/i3blocks/blocks/brightness index c131479..cca2282 100755 --- a/i3/i3blocks/blocks/brightness +++ b/i3/i3blocks/blocks/brightness @@ -7,13 +7,9 @@ get_brighntess() { brightness=$(xrandr --verbose | grep Brightness | awk '{printf "%d", $2*100}') } -print_bringtness() { - get_brighntess - echo $brightness -} - set_brightness() { xrandr --output $output --brightness $(echo $1 | awk '{printf "%0.2f", $1/100}' ) + brightness=$1 } get_brighntess @@ -26,4 +22,4 @@ case $BLOCK_BUTTON in ;; # scroll down esac -print_bringtness +echo $brightness