X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/3192a938cb9ddf16e1d36cbd9acbe92814177987..68037080cd50887746db0529e20c4bd1f8c404d4:/widgets/contrib/tpbat/smapi.lua?ds=inline diff --git a/widgets/contrib/tpbat/smapi.lua b/widgets/contrib/tpbat/smapi.lua index 3291cc2..59b916b 100644 --- a/widgets/contrib/tpbat/smapi.lua +++ b/widgets/contrib/tpbat/smapi.lua @@ -80,8 +80,9 @@ function smapi:battery(name) local time_val = bat_now.status == 'discharging' and 'remaining_running_time' or 'remaining_charging_time' local mins_left = self:get(time_val) - if mins_left:find("^%d+") == nil then - return "N/A" + if mins_left:find("^%d+") == nil + then + return "N/A" end local hrs = mins_left / 60