From d1d73b50032dd18b7e3f2b2fad30530a9dc2204b Mon Sep 17 00:00:00 2001 From: Erik Reider Date: Fri, 25 Mar 2022 14:57:04 +0100 Subject: [PATCH] Added missing "fulL" and "empty" CSS classes --- man/waybar-upower.5.scd | 2 ++ src/modules/upower/upower.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/man/waybar-upower.5.scd b/man/waybar-upower.5.scd index e6f63076..99c015a5 100644 --- a/man/waybar-upower.5.scd +++ b/man/waybar-upower.5.scd @@ -71,4 +71,6 @@ depending on the charging state. - *#upower* - *#upower.charging* - *#upower.discharging* +- *#upower.full* +- *#upower.empty* - *#upower.unknown-status* diff --git a/src/modules/upower/upower.cpp b/src/modules/upower/upower.cpp index c9c21689..00b69aaf 100644 --- a/src/modules/upower/upower.cpp +++ b/src/modules/upower/upower.cpp @@ -227,11 +227,13 @@ const std::string UPower::getDeviceStatus(UpDeviceState& state) { case UP_DEVICE_STATE_CHARGING: case UP_DEVICE_STATE_PENDING_CHARGE: return "charging"; - case UP_DEVICE_STATE_EMPTY: - case UP_DEVICE_STATE_FULLY_CHARGED: case UP_DEVICE_STATE_DISCHARGING: case UP_DEVICE_STATE_PENDING_DISCHARGE: return "discharging"; + case UP_DEVICE_STATE_FULLY_CHARGED: + return "full"; + case UP_DEVICE_STATE_EMPTY: + return "empty"; default: return "unknown-status"; }