aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2011-07-12 23:54:13 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2011-07-12 23:54:13 +0200
commit44aea3786fff36342907dfd84d3f7b1285cbb879 (patch)
tree7ad55c628014dd00f6180a1425e761b78d5ba551 /widgets
parente01a8ebe21e5be5526a363d432007ae7a09a614f (diff)
downloadvicious-legacy-44aea3786fff36342907dfd84d3f7b1285cbb879.tar.xz
bat: better fix for missing rate in 31d7b2f
Thanks to Ikke for debugging this.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/bat.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/bat.lua b/widgets/bat.lua
index 4d9b06c..615f9dd 100644
--- a/widgets/bat.lua
+++ b/widgets/bat.lua
@@ -65,7 +65,7 @@ local function worker(format, warg)
-- Calculate remaining (charging or discharging) time
local time = "N/A"
- if rate ~= nil then
+ if tonumber(rate) then
if state == "+" then
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
elseif state == "-" then