Merge pull request #4557 from adryzz/wwan-module

WWAN module (ModemManager)
This commit is contained in:
Alexis Rouillard
2026-07-04 01:48:42 +02:00
committed by GitHub
8 changed files with 520 additions and 1 deletions
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include <fmt/format.h>
#include <libmm-glib/libmm-glib.h>
#include <sys/statvfs.h>
#include <fstream>
#include "ALabel.hpp"
#include "util/format.hpp"
#include "util/sleeper_thread.hpp"
namespace waybar::modules {
class Wwan : public ALabel {
public:
Wwan(const std::string&, const Json::Value&);
virtual ~Wwan();
auto update() -> void override;
private:
void updateCurrentModem();
util::SleeperThread thread_;
std::string state_;
GDBusConnection* connection = nullptr;
MMManager* manager = nullptr;
MMModem* current_modem = nullptr;
bool hideDisconnected = true;
const std::string dbus_name = "org.freedesktop.ModemManager1";
const std::string dbus_obj_path = "/org/freedesktop/ModemManager1/";
const std::string dbus_modems_path = "/org/freedesktop/ModemManager1/Modems/";
};
} // namespace waybar::modules