eww
eww copied to clipboard
feat: add byteshumanreadable(bytes, num_digits) to expressions
Description
Can be used to display bytes, e.g. free disk space ${byteshumanreadable(EWW_DISK["/"].free,1)} -> 150.3 GB.
Or also for rates, e.g. ${byteshumanreadable(EWW_NET.wlp3s0.NET_DOWN,0)}/s -> 392 KB/s
The name is a bit long, but I could not think of anything better.
Checklist
Please make sure you can check all the boxes that apply to this PR.
- [ ] All widgets I've added are correctly documented.
- [x] I added my changes to CHANGELOG.md, if appropriate.
- [x] The documentation in the
docs/content/maindirectory has been adjusted to reflect my changes. - [x] I used
cargo fmtto automatically format all code before committing