Waybar/include/modules/systemd_failed_units.hpp

32 lines
714 B
C++
Raw Normal View History

2024-01-09 10:05:17 +00:00
#pragma once
#include <giomm/dbusproxy.h>
2024-01-30 08:07:37 +00:00
#include <string>
2024-01-09 10:05:17 +00:00
#include "ALabel.hpp"
namespace waybar::modules {
class SystemdFailedUnits : public ALabel {
public:
2024-01-30 08:07:37 +00:00
SystemdFailedUnits(const std::string &, const Json::Value &);
2024-01-09 10:05:17 +00:00
virtual ~SystemdFailedUnits();
auto update() -> void override;
private:
bool hide_on_ok;
std::string format_ok;
bool update_pending;
uint32_t nr_failed_system, nr_failed_user;
2024-02-12 19:09:22 +00:00
std::string last_status;
2024-01-09 10:05:17 +00:00
Glib::RefPtr<Gio::DBus::Proxy> system_proxy, user_proxy;
void notify_cb(const Glib::ustring &sender_name, const Glib::ustring &signal_name,
const Glib::VariantContainerBase &arguments);
void updateData();
};
} // namespace waybar::modules