remove variable reassignment
This commit is contained in:
parent
8671445a4f
commit
7fc4526353
|
@ -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()
|
||||
|
@ -70,4 +70,4 @@ function show_battery_warning()
|
|||
end
|
||||
|
||||
-- popup with battery info
|
||||
battery_widget:connect_signal("mouse::enter", function() show_battery_status() end)
|
||||
battery_widget:connect_signal("mouse::enter", function() show_battery_status() end)
|
||||
|
|
Loading…
Reference in New Issue