diff --git a/eww/eww-battery-monitor b/eww/eww-battery-monitor index f79455b..d5ae9c7 100755 --- a/eww/eww-battery-monitor +++ b/eww/eww-battery-monitor @@ -72,7 +72,9 @@ function parse_record(record, exit_on_absent) { } } name = props["native-path"] - if ((! BATTERY && props["power supply"] == "yes" && \ + if (name == "") { + return 0 + } else if ((! BATTERY && props["power supply"] == "yes" && \ props["native-path"] ~ /BAT[0-9]+/) || name == BATTERY) { state_info["percentage"] = props["percentage"] + 0 return 1