summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Makhov <streetturtle@users.noreply.github.com>2017-02-04 10:58:01 -0500
committerstreetturtle <streetturtle@gmail.com>2017-02-04 11:09:53 -0500
commit7fc4526353a565ffb4be72fe1e7fde432e7be0e4 (patch)
treee873402e6e45795db0700d5db7af5929ffc994cf
parent8671445a4fb574d713f3f083f2377497b3897d9c (diff)
remove variable reassignment
-rw-r--r--battery-widget/battery.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua
index 2633ba2..cb07712 100644
--- a/battery-widget/battery.lua
+++ b/battery-widget/battery.lua
@@ -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) \ No newline at end of file
+battery_widget:connect_signal("mouse::enter", function() show_battery_status() end)