mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	Displaying in ko/s and kb/s instead of interval dependant unit
This commit is contained in:
		| @@ -302,10 +302,10 @@ auto waybar::modules::Network::update() -> void { | ||||
|                           fmt::arg("cidr", cidr_), | ||||
|                           fmt::arg("frequency", frequency_), | ||||
|                           fmt::arg("icon", getIcon(signal_strength_, connectiontype)), | ||||
|                           fmt::arg("bandwidthDownBits", pow_format(bandwidth_down * 8ull, "b")), | ||||
|                           fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull, "b")), | ||||
|                           fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down, "o")), | ||||
|                           fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up, "o"))); | ||||
|                           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"))); | ||||
|   label_.set_markup(text); | ||||
|   if (tooltipEnabled()) { | ||||
|     if (!tooltip_format.empty()) { | ||||
| @@ -319,10 +319,10 @@ auto waybar::modules::Network::update() -> void { | ||||
|                                       fmt::arg("cidr", cidr_), | ||||
|                                       fmt::arg("frequency", frequency_), | ||||
|                                       fmt::arg("icon", getIcon(signal_strength_, connectiontype)), | ||||
|                                       fmt::arg("bandwidthDownBits", pow_format(bandwidth_down * 8ull, "b")), | ||||
|                                       fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull, "b")), | ||||
|                                       fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down, "o")), | ||||
|                                       fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up, "o"))); | ||||
|                                       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"))); | ||||
|       label_.set_tooltip_text(tooltip_text); | ||||
|     } else { | ||||
|       label_.set_tooltip_text(text); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lucas Lazare
					Lucas Lazare