Merge pull request #37 from dudelson/master

Change bat widget discharging state char from U+2212 to U+002D
This commit is contained in:
Jörg Thalheim 2017-05-28 09:02:20 +01:00 committed by GitHub
commit aabb3d3ae5
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ local function worker(format, warg)
["Unknown\n"] = "", ["Unknown\n"] = "",
["Charged\n"] = "", ["Charged\n"] = "",
["Charging\n"] = "+", ["Charging\n"] = "+",
["Discharging\n"] = "" ["Discharging\n"] = "-"
} }
-- Get current power usage in watt -- Get current power usage in watt
@ -80,7 +80,7 @@ local function worker(format, warg)
if rate ~= nil and rate ~= 0 then if rate ~= nil and rate ~= 0 then
if state == "+" then if state == "+" then
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate) timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
elseif state == "" then elseif state == "-" then
timeleft = tonumber(remaining) / tonumber(rate) timeleft = tonumber(remaining) / tonumber(rate)
else else
return {state, percent, time, wear, curpower} return {state, percent, time, wear, curpower}