X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6cd0a29535e70d4f1c861cbf97ca482b949e20ee..f50543b4497c5055c51060b32eead6e51584d360:/widgets/bat.lua?ds=sidebyside diff --git a/widgets/bat.lua b/widgets/bat.lua index f20034b..1391641 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -94,7 +94,7 @@ local function worker(args) local rate_time = 0 if bat_now.status == "Charging" then - rate_time = (energy_full - energy_now) / rate_power or rate_current + rate_time = (energy_full - energy_now) / (rate_power or rate_current) elseif bat_now.status == "Discharging" then rate_time = energy_now / (rate_power or rate_current) end