Hide module if UPower service isn't running

This commit is contained in:
Erik Reider
2022-03-25 17:27:36 +01:00
parent 0140606226
commit e0f0931e2d
2 changed files with 34 additions and 0 deletions

View File

@ -34,6 +34,10 @@ class UPower : public AModule {
const gchar *object_path, const gchar *interface_name,
const gchar *signal_name, GVariant *parameters,
gpointer user_data);
static void upowerAppear(GDBusConnection *conn, const gchar *name, const gchar *name_owner,
gpointer data);
static void upowerDisappear(GDBusConnection *connection, const gchar *name, gpointer user_data);
void removeDevice(const gchar *objectPath);
void addDevice(UpDevice *device);
void setDisplayDevice();
@ -67,6 +71,8 @@ class UPower : public AModule {
UPowerTooltip *upower_tooltip;
std::string lastStatus;
bool showAltText;
bool upowerRunning;
guint upowerWatcher_id;
};
} // namespace waybar::modules::upower