remove variable reassignment

This commit is contained in:
Pavel Makhov 2017-02-04 10:58:01 -05:00 committed by streetturtle
parent 8671445a4f
commit 7fc4526353
1 changed files with 3 additions and 3 deletions

View File

@ -25,8 +25,8 @@ watch(
"acpi", 10,
function(widget, stdout, stderr, exitreason, exitcode)
local batteryType
local _, status, charge, time = string.match(stdout, '(.+): (%a+), (%d?%d%d)%%,? ?.*')
charge = tonumber(charge)
local _, status, charge_str, time = string.match(stdout, '(.+): (%a+), (%d?%d%d)%%,? ?.*')
local charge = tonumber(charge_str)
if (charge >= 0 and charge < 15) then
batteryType="battery-empty"
show_battery_warning()