X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/effa8f1dc2e428f876b916efc5b2d8efcbf64863..e363fdfeafc331ee29780905361f137aa691b5df:/widgets/bat.lua diff --git a/widgets/bat.lua b/widgets/bat.lua index e5b5afc..62d1469 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -28,7 +28,7 @@ local function worker(args) local timeout = args.timeout or 30 local batteries = args.batteries or (args.battery and {args.battery}) or {"BAT0"} local ac = args.ac or "AC0" - local notify = args.notify or true + local notify = args.notify or "on" local settings = args.settings or function() end bat.widget = wibox.widget.textbox('') @@ -133,7 +133,7 @@ local function worker(args) settings() -- notifications for low and critical states - if notify and bat_now.perc and bat_now.status == "Discharging" 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({