summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)