commit 044c41aa7880752122ec72767e61648a5ba84eb4 parent 0d75688d18c042526bb93f62f127ce7a2a129029 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Thu, 2 Mar 2017 02:16:37 +0100 rounding Diffstat:
xbl | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xbl b/xbl @@ -14,6 +14,7 @@ ls /sys/devices/pci*/**/intel_backlight/brightness | while read l do MAX=$(cat ${l%brightness}max_brightness) VAL=$(($MAX * $PERCENTAGE / 100)) - echo "$VAL" | sudo tee $l > /dev/null + VALN=$(printf '%.*f\n' 0 "$VAL") + echo "$VALN" | sudo tee $l > /dev/null done