aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wmstatus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wmstatus.c b/wmstatus.c
index a35ebc6..29cfa0f 100644
--- a/wmstatus.c
+++ b/wmstatus.c
@@ -1112,6 +1112,15 @@ try_power_supply (int dir, struct error **e)
return NULL;
}
+ bool offline = !read_number (dir, "online", &error);
+ if (error)
+ {
+ error_free (error);
+ error = NULL;
+ }
+ else if (offline)
+ return NULL;
+
bool is_relevant =
!strcmp (type, "Battery") ||
!strcmp (type, "USB") ||