From 99a0db84dd16935f9357176248c824bcc372ee43 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Wed, 13 May 2020 13:58:04 -0400 Subject: Support fractional values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Treat values passed on the command line as floats instead of longs. This allows you to specify fractional percentages (and fractional absolute values, too, though they’ll just be rounded down, so they’re not particularly useful). Report the display brightness as a percentage with two decimal places rather than zero. To ensure backward compatibility in machine-readable mode, report the high-precision percentage in a new field rather than replacing the existing field. This does cause some redundancy in the output, but that’s better than breaking scripts that assume the 4th field is an integer followed by “%”. Closes: https://github.com/Hummer12007/brightnessctl/issues/50 --- brightnessctl.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'brightnessctl.1') diff --git a/brightnessctl.1 b/brightnessctl.1 index 83faf8d..d8c2065 100644 --- a/brightnessctl.1 +++ b/brightnessctl.1 @@ -124,9 +124,9 @@ as a value or a delta from the current value. For example: Sets brightness to 500. .P .RE -\fBbrightnessctl set 50%\fR +\fBbrightnessctl set 50.75%\fR .RS "4" -Sets brightness to 50% of the maximum. +Sets brightness to 50.75% of the maximum. .P .RE \fBbrightnessctl set 50-\fR -- cgit v1.2.3