Network module: Incorrect units for {bandwidthUpBytes} and {bandwidthDownBytes} when used in "tooltip-format"
What's Wrong
The issue illustrates itself best through some illustrations:
What seems to be happening is that all the units for {bandwidthUpBytes} and {bandwidthDownBytes} within the tooltip are one magnitude lower than they should be --- e.g. x B/s -> 0 B/s, x kB/s -> x B/s, x MB/s -> x kB/s.
What's Actually Expected
Even within a tooltip, {bandwidthUpBytes} and {bandwidthDownBytes} should have the correct units:[^1]
[^1]: Of course, I don't expect it to be green, the green color is there there to highlight changes made from the current behavior to the expected behavior.
Setup
- The network module configuration in
~/.config/waybar/config.jsonc:
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"interval": 2,
"format-wifi": "{icon} {bandwidthUpBytes} {bandwidthDownBytes}",
"format-ethernet": "{ipaddr}/{cidr} ",
"family": "ipv4_6",
"tooltip-format": "SSID: {essid}\nifname: {ifname}\nIP: {ipaddr}\nGateway: {gwaddr}\nNetmask4: /{cidr}\nNetmask6: /{cidr6}\n : {bandwidthUpBytes} : {bandwidthDownBytes}",
"format-linked": "(No IP) ",
"format-disconnected": "<span color=\"#ee6d85\"></span>",
"format-icons": ["<span color=\"#ee6d85\"></span>", "<span color=\"#d7a65f\"></span>", "", "", ""]
},
- Waybar v0.15.0
- sway version 1.11
Already fixed on current master — this is the same tooltip-vs-label divisor bug as #4867, fixed in 25089b24 (the tooltip block was missing the ms→s / 1000.0 conversion, so {bandwidth*Bytes} came out 1000× too small in tooltip-format only). You're on 0.15.0 which predates that fix; a newer build resolves it. 🙏
Ah I see, sorry to waste your time; I didn't realise this was fixed already. Thanks for the helpful reply!