#pragma once #include #include #include #include #include #include #include #include "util/chrono.hpp" #include "IModule.hpp" namespace waybar::modules { class Network : public IModule { public: Network(Json::Value config); auto update() -> void; operator Gtk::Widget &(); private: void _parseEssid(struct nlattr **bss); void _parseSignal(struct nlattr **bss); bool _associatedOrJoined(struct nlattr **bss); static int _scanCb(struct nl_msg *msg, void *data); auto _getInfo() -> void; Gtk::Label _label; waybar::util::SleeperThread _thread; Json::Value _config; std::size_t _ifid; std::string _essid; int _signalStrengthdBm; int _signalStrength; }; }