eww icon indicating copy to clipboard operation
eww copied to clipboard

feat: add byteshumanreadable(bytes, num_digits) to expressions

Open bkueng opened this issue 11 months ago • 0 comments

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/main directory has been adjusted to reflect my changes.
  • [x] I used cargo fmt to automatically format all code before committing

bkueng avatar Jan 25 '25 10:01 bkueng