X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/2d8e93f18961e2d5c051b749e667a0ddc9d14ae3..e363fdfeafc331ee29780905361f137aa691b5df:/widgets/bat.lua?ds=inline diff --git a/widgets/bat.lua b/widgets/bat.lua index 3b9cca0..62d1469 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -133,7 +133,7 @@ local function worker(args) settings() -- notifications for low and critical states - if bat_now.status == "Discharging" and notify == "on" and bat_now.perc then + if notify == "on" and bat_now.perc and bat_now.status == "Discharging" then local nperc = tonumber(bat_now.perc) or 100 if nperc <= 5 then bat.id = naughty.notify({