Added cffi/* module for third-party advanced modules

This commit is contained in:
Crom (Thibaut CHARLES)
2023-10-16 22:13:51 +02:00
parent 6ae354f564
commit 088ca6b963
14 changed files with 334 additions and 143 deletions

View File

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