Skip to content

Conversation

@bbarenblat
Copy link
Contributor

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: #50

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
@Hummer12007
Copy link
Owner

Hummer12007 commented May 14, 2020

Would this code produce well-formed CSVs when the locale has comma as the decimal separator?

@Atemu
Copy link

Atemu commented Jun 22, 2024

Would not using locale for CSV export be acceptable?

Or perhaps TSV? Surely no locale uses tabs as a decimal separator.

@Hummer12007
Copy link
Owner

Superseded by #127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support fractional percentages

3 participants