aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--widgets/bat.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/widgets/bat.lua b/widgets/bat.lua
index 0048981..1641252 100644
--- a/widgets/bat.lua
+++ b/widgets/bat.lua
@@ -57,7 +57,9 @@ local function worker(format, warg)
-- Get charge information
if battery.current_now then
rate = battery.current_now
- else -- Todo: other rate sources, as with capacity?
+ elseif battery.power_now then
+ rate = battery.power_now
+ else
return {state, percent, "N/A"}
end