mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(modules): generic label module to allow max-length on all labels
This commit is contained in:
@ -5,18 +5,16 @@
|
||||
#include <netlink/genl/genl.h>
|
||||
#include <netlink/genl/ctrl.h>
|
||||
#include <linux/nl80211.h>
|
||||
#include <json/json.h>
|
||||
#include <fmt/format.h>
|
||||
#include "util/chrono.hpp"
|
||||
#include "IModule.hpp"
|
||||
#include "ALabel.hpp"
|
||||
|
||||
namespace waybar::modules {
|
||||
|
||||
class Network : public IModule {
|
||||
class Network : public ALabel {
|
||||
public:
|
||||
Network(Json::Value);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
static uint64_t netlinkRequest(int, void*, uint32_t, uint32_t groups = 0);
|
||||
static uint64_t netlinkResponse(int, void*, uint32_t, uint32_t groups = 0);
|
||||
@ -29,10 +27,7 @@ class Network : public IModule {
|
||||
bool associatedOrJoined(struct nlattr**);
|
||||
auto getInfo() -> void;
|
||||
|
||||
Gtk::Label label_;
|
||||
waybar::util::SleeperThread thread_;
|
||||
Json::Value config_;
|
||||
|
||||
int ifid_;
|
||||
sa_family_t family_;
|
||||
int sock_fd_;
|
||||
|
Reference in New Issue
Block a user