Skip to content

Commit 799125f

Browse files
authored
Merge pull request #1489 from momokrono/master
feat: added network speed in Bytes
2 parents a37ef74 + fcf93a6 commit 799125f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/modules/network.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ auto waybar::modules::Network::update() -> void {
342342
fmt::arg("bandwidthDownBits", pow_format(bandwidth_down * 8ull / interval_.count(), "b/s")),
343343
fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")),
344344
fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")),
345-
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")));
345+
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")),
346+
fmt::arg("bandwidthDownBytes", pow_format(bandwidth_down / interval_.count(), "B/s")),
347+
fmt::arg("bandwidthUpBytes", pow_format(bandwidth_up / interval_.count(), "B/s")));
346348
if (text.compare(label_.get_label()) != 0) {
347349
label_.set_markup(text);
348350
if (text.empty()) {
@@ -373,7 +375,9 @@ auto waybar::modules::Network::update() -> void {
373375
pow_format(bandwidth_down * 8ull / interval_.count(), "b/s")),
374376
fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")),
375377
fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")),
376-
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")));
378+
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")),
379+
fmt::arg("bandwidthDownBytes", pow_format(bandwidth_down / interval_.count(), "B/s")),
380+
fmt::arg("bandwidthUpBytes", pow_format(bandwidth_up / interval_.count(), "B/s")));
377381
if (label_.get_tooltip_text() != tooltip_text) {
378382
label_.set_tooltip_text(tooltip_text);
379383
}

0 commit comments

Comments
 (0)