mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #998] [MERGED] feat(bar): to_pretty_bytes on network #1162
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/998
Author: @CtByte
Created: 9/12/2024
Status: ✅ Merged
Merged: 9/13/2024
Merged by: @LGUG2Z
Base:
feature/komorebi-status-bar← Head:feature/komorebi-status-bar-network📝 Commits (1)
8501f7eto_pretty_bytes on network activity📊 Changes
3 files changed (+64 additions, -24 deletions)
View changed files
📝
.gitignore(+1 -0)📝
komorebi-bar/Cargo.toml(+3 -0)📝
komorebi-bar/src/network.rs(+60 -24)📄 Description
I added formatting to the network widget that prettifies bytes.
I think it made sense to choose
KiBas the minimum data unit, which could be changed by adding it to the settings, if needed.I formatted the output on the activity readings with left padding to make it easier to read the values when they change constantly.
I changed the icons too, sorry 😄
I think that the
to_pretty_bytesfunction could be placed in a separate file so another widget can use it as well. For example if we want to display the size on the drives or ram.I little bit of refactoring might be needed, I am pretty new to Rust :)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.