From: Luke Bonham Date: Thu, 9 Jun 2016 10:19:03 +0000 (+0200) Subject: battery: always update status (fix perc) #199 #203 X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/f76940230a854482a2ff3715fd2427eba206e68d?ds=inline;hp=--cc battery: always update status (fix perc) #199 #203 --- f76940230a854482a2ff3715fd2427eba206e68d diff --git a/widgets/bat.lua b/widgets/bat.lua index 0da9708..df0ee5d 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -131,12 +131,12 @@ local function worker(args) -- notifications for low and critical states if notify == "on" and bat_now.perc and bat_now.status == "Discharging" then - if perc <= 5 then + if bat_now.perc <= 5 then bat.id = naughty.notify({ preset = bat_notification_critical_preset, replaces_id = bat.id }).id - elseif perc <= 15 then + elseif bat_now.perc <= 15 then bat.id = naughty.notify({ preset = bat_notification_low_preset, replaces_id = bat.id