From: copycat-killer Date: Wed, 1 Jun 2016 11:37:20 +0000 (+0200) Subject: #199 syntactic change X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/2d8e93f18961e2d5c051b749e667a0ddc9d14ae3?hp=--cc;pf=etc #199 syntactic change --- 2d8e93f18961e2d5c051b749e667a0ddc9d14ae3 diff --git a/widgets/bat.lua b/widgets/bat.lua index 6db5d95..3b9cca0 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -110,8 +110,7 @@ local function worker(args) bat_now.ac_status = first_line(string.format("/sys/class/power_supply/%s/online", ac)) or "N/A" -- update {perc,time,watt} iff rate > 0 and battery not full - if (sum_rate_current > 0 or sum_rate_power > 0) - and bat_now.status ~= "N/A" and bat_now.status ~= "Full" + if (sum_rate_current > 0 or sum_rate_power > 0) and not (bat_now.status == "Full") then local rate_time = 0