waybar: Pin battery module to BAT0

Bluetooth HID devices (e.g. a mouse) appearing as power_supply
entries in sysfs make waybar's Battery::refreshBatteries() throw
an uncaught exception and abort. Restricting to BAT0 avoids
enumerating those devices.
This commit is contained in:
Alexander Heldt
2026-09-01 10:07:07 +02:00
parent 5ec6f7d636
commit babec6336f
@@ -208,6 +208,7 @@ in
}; };
battery = { battery = {
"bat" = "BAT0";
"interval" = 60; "interval" = 60;
"format" = "<span font='10' rise='1000'>{icon}</span> {capacity}%"; "format" = "<span font='10' rise='1000'>{icon}</span> {capacity}%";
"format-time" = "{H}h {M}min"; "format-time" = "{H}h {M}min";