From 0419303daa616d42ea222d002f1aea2f9ba7f26f Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Fri, 26 Dec 2025 22:38:13 +0100 Subject: wmstatus: indicate charge readout failures --- wmstatus.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wmstatus.c') diff --git a/wmstatus.c b/wmstatus.c index 7f697e2..fc7cedf 100644 --- a/wmstatus.c +++ b/wmstatus.c @@ -1265,6 +1265,8 @@ read_battery_status (int dir, char **type) int charge = read_battery_charge (dir); if (charge >= 0 && charge <= 100) str_append_printf (&s, "%u%%", charge); + else + str_append_printf (&s, "—"); char *status = NULL; char *model_name = read_value (dir, "model_name", NULL); -- cgit v1.2.3-70-g09d2