fix: id read and name set

This commit is contained in:
Ricardo Markiewicz
2026-04-08 23:36:47 +02:00
parent 01c6ebdf9e
commit 283515901e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -363,8 +363,8 @@ 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], bar_.output->name);
}
if (ref.compare(0, 13, "custom-graph/") == 0 && ref.size() > 7) {
return new waybar::modules::CustomGraph(ref.substr(7), id, config_[name], bar_.output->name);
if (ref.compare(0, 13, "custom-graph/") == 0 && ref.size() > 13) {
return new waybar::modules::CustomGraph(ref.substr(13), 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]);
+1 -1
View File
@@ -6,7 +6,7 @@
waybar::modules::CustomGraph::CustomGraph(const std::string& name, const std::string& id,
const Json::Value& config, const std::string& output_name)
: AGraph(config, "custom-graph" + name, id),
: AGraph(config, "custom-graph-" + name, id),
name_(name),
output_name_(output_name),
id_(id),