diff options
author | Shubham Pawar <31388020+shubham-cpp@users.noreply.github.com> | 2022-04-16 18:30:12 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 18:30:12 +0530 |
commit | fc7d966cb9f06eb2da2e8998402adc8663d831ee (patch) | |
tree | ed2bd23e6340aab609de1a881c30dadf5116250b /battery-widget | |
parent | 6d1c05decca2fffe87863fceaa163a077360f21d (diff) | |
parent | 8439ca7930e73e17746a1d6f0610417e8a42865f (diff) |
Merge branch 'master' into update-brightnessctl
Diffstat (limited to 'battery-widget')
-rw-r--r-- | battery-widget/battery.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua index f7f76b5..452d7ef 100644 --- a/battery-widget/battery.lua +++ b/battery-widget/battery.lua @@ -125,7 +125,7 @@ local function worker(user_args) local battery_info = {} local capacities = {} for s in stdout:gmatch("[^\r\n]+") do - local status, charge_str, _ = string.match(s, '.+: (%a+), (%d?%d?%d)%%,?(.*)') + local status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)') if status ~= nil then table.insert(battery_info, {status = status, charge = tonumber(charge_str)}) else |