refactor: also pass id to custom modules

This commit is contained in:
Alex
2019-05-22 12:20:13 +02:00
parent e999cca7a6
commit 9e1200ae32
3 changed files with 5 additions and 4 deletions

View File

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