This commit is contained in:
Crom (Thibaut CHARLES)
2023-10-14 19:14:46 +02:00
parent a459d8a9b3
commit 6ae354f564
7 changed files with 144 additions and 0 deletions

View File

@ -201,6 +201,9 @@ 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]);
}
if (ref.compare(0, 5, "cabi/") == 0 && ref.size() > 5) {
return new waybar::modules::CABI(ref.substr(5), id, config_[name]);
}
} catch (const std::exception& e) {
auto err = fmt::format("Disabling module \"{}\", {}", name, e.what());
throw std::runtime_error(err);