mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
feat(modules): generic label module to allow max-length on all labels
This commit is contained in:
@ -1,22 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <json/json.h>
|
||||
#include <fmt/format.h>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
#include "ALabel.hpp"
|
||||
|
||||
namespace waybar::modules {
|
||||
|
||||
class Custom : public IModule {
|
||||
class Custom : public ALabel {
|
||||
public:
|
||||
Custom(const std::string&, Json::Value);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
const std::string name_;
|
||||
Gtk::Label label_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
Json::Value config_;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user