image module CSS fix

This commit is contained in:
Brent George
2023-01-24 14:34:02 -05:00
parent dd9e3d0172
commit e128c48573
4 changed files with 21 additions and 15 deletions

View File

@ -97,6 +97,9 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
}
if (ref == "disk") {
return new waybar::modules::Disk(id, config_[name]);
}
if (ref == "image") {
return new waybar::modules::Image(id, config_[name]);
}
#ifdef HAVE_DBUSMENU
if (ref == "tray") {
@ -156,8 +159,6 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
}
if (ref.compare(0, 7, "custom/") == 0 && ref.size() > 7) {
return new waybar::modules::Custom(ref.substr(7), id, config_[name]);
} else if (ref.compare(0, 6, "image/") == 0 && ref.size() > 6) {
return new waybar::modules::Image(ref.substr(6), id, config_[name]);
}
} catch (const std::exception& e) {
auto err = fmt::format("Disabling module \"{}\", {}", name, e.what());