refactor: move label name and id to label contructor

This commit is contained in:
Alex
2019-05-22 12:06:24 +02:00
parent 97bd637f5d
commit d24d85bebf
16 changed files with 32 additions and 75 deletions

View File

@ -2,8 +2,7 @@
#include <spdlog/spdlog.h>
waybar::modules::Custom::Custom(const std::string& name, const Json::Value& config)
: ALabel(config, "{}"), name_(name), fp_(nullptr), pid_(-1) {
label_.set_name("custom-" + name_);
: ALabel(config, "custom-" + name_, name, "{}"), name_(name), fp_(nullptr), pid_(-1) {
if (config_["exec"].isString()) {
if (interval_.count() > 0) {
delayWorker();