Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Battery module - possible bug?

Open o0nd7ots opened this issue 1 year ago • 2 comments

Hello

My config for battery modules is as follows:

"battery": {
  "states": { "good": 60, "warning": 20, "critical": 10 },
   "format":          "{icon} {capacity}%",
   // "tooltip-format":  "{capacity}%, {status}",
   "format-plugged":  "{capacity}% ",
   "format-charging": "{capacity}% ↑",
   "format-not-charging": "",  
   "format-icons": ["", // dying
                    "", // 
                    "", //
                    "", //
                    ""],//full
}

I would like to get both the capacity and status on the tooltip. However if I uncomment the tooltip-format, the icon disappears and from what I can tell the module is dead, but no errors are shown on the console.

I am running Waybar v0.9.22 on Hyprland 0.34.

o0nd7ots avatar Feb 25 '24 13:02 o0nd7ots

if I run your config with waybar -l debug I see an error:

[...] [error] battery: argument not found

I suspect {status} is not supported in tooltip-format, if I remove it, the error disappears for me.

You probably need to use tooltip-format-<status> or tooltip-format-<status>-<state>, see the wiki documentation.

apiraino avatar Mar 29 '24 19:03 apiraino

if I replace the commented out line with "tooltip-format-<status>": "{capacity}%", I get the standard format (ex. Not charging.

After reading the wiki I am still not sure how to display both status and capacity.

From what I understand custom formats are activated by states/status. I want my stuff to be shown all the time.

o0nd7ots avatar Apr 01 '24 18:04 o0nd7ots