feat: add custom module to allow execution of external script

This commit is contained in:
Alexis
2018-08-10 16:26:46 +02:00
parent e5fcbe8017
commit e16cce646b
9 changed files with 88 additions and 7 deletions

View File

@ -20,5 +20,7 @@ waybar::IModule &waybar::Factory::makeModule(std::string name)
return *new waybar::modules::Network(_config[name]);
if (name == "pulseaudio")
return *new waybar::modules::Pulseaudio(_config[name]);
if (!name.compare(0, 7, "custom/") && name.size() > 7)
return *new waybar::modules::Custom(name.substr(7), _config[name]);
throw std::runtime_error("Unknown module: " + name);
}