Pass WAYBAR_OUTPUT_NAME environment variable to custom exec scripts

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
This commit is contained in:
Jo De Boeck
2023-12-19 22:54:12 +02:00
parent f5370fcff5
commit 0ea5143493
5 changed files with 17 additions and 12 deletions

View File

@ -205,7 +205,7 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::Temperature(id, config_[name]);
}
if (ref.compare(0, 7, "custom/") == 0 && ref.size() > 7) {
return new waybar::modules::Custom(ref.substr(7), id, config_[name]);
return new waybar::modules::Custom(ref.substr(7), id, config_[name], bar_.output->name);
}
if (ref.compare(0, 5, "cffi/") == 0 && ref.size() > 5) {
return new waybar::modules::CFFI(ref.substr(5), id, config_[name]);