summaryrefslogtreecommitdiff
path: root/battery-widget
diff options
context:
space:
mode:
Diffstat (limited to 'battery-widget')
-rw-r--r--battery-widget/battery.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua
index badbc8f..01a3ddd 100644
--- a/battery-widget/battery.lua
+++ b/battery-widget/battery.lua
@@ -70,7 +70,7 @@ end
watch("acpi", 10,
function(widget, stdout, stderr, exitreason, exitcode)
local batteryType
- local _, status, charge_str, time = string.match(stdout, '(.+): (%a+), (%d?%d%d)%%,? ?.*')
+ 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%s-symbolic"