fix: id read and name set
This commit is contained in:
+2
-2
@@ -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]);
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user