Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add byteshumanreadable(bytes, num_digits) to expressions #1277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkueng
Copy link

@bkueng bkueng commented Jan 25, 2025

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.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

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.

1 participant