added support for battery state-based classes on the entire waybar

This commit is contained in:
ArneshRC
2024-01-07 17:09:31 +05:30
parent 4b20f522f0
commit 3390c16f52
3 changed files with 42 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
auto id = hash_pos != std::string::npos ? name.substr(hash_pos + 1) : "";
#if defined(__FreeBSD__) || (defined(__linux__) && !defined(NO_FILESYSTEM))
if (ref == "battery") {
return new waybar::modules::Battery(id, config_[name]);
return new waybar::modules::Battery(id, bar_, config_[name]);
}
#endif
#ifdef HAVE_GAMEMODE