I added formatting to the network widget that prettifies bytes.
I think it made sense to choose KiB as 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_bytes function 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.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/998
**Author:** [@CtByte](https://github.com/CtByte)
**Created:** 9/12/2024
**Status:** ✅ Merged
**Merged:** 9/13/2024
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `feature/komorebi-status-bar` ← **Head:** `feature/komorebi-status-bar-network`
---
### 📝 Commits (1)
- [`8501f7e`](https://github.com/LGUG2Z/komorebi/commit/8501f7e6c6877ea96a9345dfa668d05dc0d99715) to_pretty_bytes on network activity
### 📊 Changes
**3 files changed** (+64 additions, -24 deletions)
<details>
<summary>View changed files</summary>
📝 `.gitignore` (+1 -0)
📝 `komorebi-bar/Cargo.toml` (+3 -0)
📝 `komorebi-bar/src/network.rs` (+60 -24)
</details>
### 📄 Description
I added formatting to the network widget that prettifies bytes.
I think it made sense to choose `KiB` as 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_bytes` function 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 :)

---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.