mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(battery): check for battries :(
This commit is contained in:
@ -14,6 +14,11 @@ waybar::modules::Battery::Battery(Json::Value config)
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
||||
if (!_batteries.size()) {
|
||||
std::cerr << "No battries." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
_label.get_style_context()->add_class("battery");
|
||||
|
||||
_thread = [this] {
|
||||
|
Reference in New Issue
Block a user