Open joandrsn opened 4 years ago
Nice idea :+1:
Generally, being able to format all output entirely according to preferences would be preferred.
42.0% (-2:20)
, candidates could be:
Which of these would you prefer to be able to modify?
Secondly, I'm in the process of porting this script into python to make packaging and building easier. I plan on writing a PR to https://github.com/vivien/i3blocks-contrib/ so it will be upstreamed on AUR.
Hmm thats a bit of a thinker.
A solution would be to make it like date(1) with format string, but I think that would be too overkill.
For now, a solution could simply be: -n {d}
, where d
is the number of decimals, settable from 0 to X (maybe max 5?)
Maybe just limiting to percentage formatting would be a workable compromise.
I've written the PR for i3blocks-contrib
where a formatting string for the percentage is available as an argument: https://github.com/vivien/i3blocks-contrib/pull/304
It would be awesome if I could choose to format the output without the decimals, so instead of 85.00, it would just display 85.
Additionally, someone might want 85.0.
Maybe a commandline parameter could be set for the format wanted?