mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat: add custom module to allow execution of external script
This commit is contained in:
24
include/modules/custom.hpp
Normal file
24
include/modules/custom.hpp
Normal 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;
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user