feat: add custom module to allow execution of external script

This commit is contained in:
Alexis
2018-08-10 16:26:46 +02:00
parent e5fcbe8017
commit e16cce646b
9 changed files with 88 additions and 7 deletions

View File

@ -8,6 +8,7 @@
#include "modules/cpu.hpp"
#include "modules/network.hpp"
#include "modules/pulseaudio.hpp"
#include "modules/custom.hpp"
namespace waybar {

View File

@ -0,0 +1,24 @@
#pragma once
#include <json/json.h>
#include <gtkmm.h>
#include <fmt/format.h>
#include <thread>
#include "util/chrono.hpp"
#include "IModule.hpp"
namespace waybar::modules {
class Custom : public IModule {
public:
Custom(std::string name, Json::Value config);
auto update() -> void;
operator Gtk::Widget &();
private:
Gtk::Label _label;
waybar::util::SleeperThread _thread;
const std::string _name;
Json::Value _config;
};
}