aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2011-02-15 03:49:43 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2011-02-15 03:49:43 +0100
commit6ddad318e04efde936d05edd22fd981de50ca2b8 (patch)
treee2b0f0af4880f66bc79a20e5ef7fb76fbd01c200 /widgets
parentfd0718e3f81b5427af4a65cc57495d02a15b5fb0 (diff)
downloadvicious-legacy-6ddad318e04efde936d05edd22fd981de50ca2b8.tar.xz
bat: added power_now support
Looks like current_now will eventually be deprecated. Thanks to Conrad Calmez for finding this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532000
Diffstat (limited to 'widgets')
-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