-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support fractional percentages #50
Comments
bbarenblat
added a commit
to bbarenblat/brightnessctl
that referenced
this issue
May 13, 2020
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: Hummer12007#50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be great if I could pass fractional percentage values to brightnessctl – e.g.,
brightnessctl set 0.5%
. It looks like all the percentage calculations occur on the FPU anyway, so this could probably be done simply by changingvalue.val
to be afloat
and usingstrtof
to parse it.The text was updated successfully, but these errors were encountered: