diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-02-15 03:49:43 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-02-15 03:49:43 +0100 |
commit | 6ddad318e04efde936d05edd22fd981de50ca2b8 (patch) | |
tree | e2b0f0af4880f66bc79a20e5ef7fb76fbd01c200 /widgets | |
parent | fd0718e3f81b5427af4a65cc57495d02a15b5fb0 (diff) | |
download | vicious-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.lua | 4 |
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 |