From fcf93a6c45eede8fb5a31e6a1c0613f368e09ecc Mon Sep 17 00:00:00 2001 From: momokrono Date: Fri, 18 Mar 2022 10:35:19 +0100 Subject: [PATCH] feat: added network speed in Bytes --- src/modules/network.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 6935430e..74b54d91 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -342,7 +342,9 @@ auto waybar::modules::Network::update() -> void { fmt::arg("bandwidthDownBits", pow_format(bandwidth_down * 8ull / interval_.count(), "b/s")), fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")), fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")), - fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s"))); + fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")), + fmt::arg("bandwidthDownBytes", pow_format(bandwidth_down / interval_.count(), "B/s")), + fmt::arg("bandwidthUpBytes", pow_format(bandwidth_up / interval_.count(), "B/s"))); if (text.compare(label_.get_label()) != 0) { label_.set_markup(text); if (text.empty()) { @@ -373,7 +375,9 @@ auto waybar::modules::Network::update() -> void { pow_format(bandwidth_down * 8ull / interval_.count(), "b/s")), fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")), fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")), - fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s"))); + fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")), + fmt::arg("bandwidthDownBytes", pow_format(bandwidth_down / interval_.count(), "B/s")), + fmt::arg("bandwidthUpBytes", pow_format(bandwidth_up / interval_.count(), "B/s"))); if (label_.get_tooltip_text() != tooltip_text) { label_.set_tooltip_text(tooltip_text); }