You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 changing value.val to be a float and using strtof to parse it.
The text was updated successfully, but these errors were encountered:
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
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: