Merge pull request #2573 from CromFr/cabi_plugins

C ABI plugin system
This commit is contained in:
Alexis Rouillard
2023-12-18 14:10:02 +01:00
committed by GitHub
12 changed files with 435 additions and 0 deletions

View File

@ -207,6 +207,9 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
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, "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());
throw std::runtime_error(err);