Skip to content

Network module: Incorrect units for {bandwidthUpBytes} and {bandwidthDownBytes} when used in "tooltip-format" #5089

@GrassGlass

Description

@GrassGlass

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

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

Footnotes

  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions