summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Delmerico <svdelmerico@gmail.com>2018-06-16 00:39:14 -0400
committerSam Delmerico <svdelmerico@gmail.com>2018-06-16 00:39:14 -0400
commit3d38cdb866bc6360b1d00d6b8ebdc695fa41bb0d (patch)
tree968d0a352d91cb0e9f6a9625504c6d79c33d9448
parentbfe818b11e3a15fefc1b76383a7e1b5e1f7827ff (diff)
forgot to include update for low battery frequency
-rw-r--r--battery-widget/battery.lua2
-rw-r--r--batteryarc-widget/batteryarc.lua2
2 files changed, 4 insertions, 0 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua
index b8e70bb..4cbc314 100644
--- a/battery-widget/battery.lua
+++ b/battery-widget/battery.lua
@@ -95,6 +95,8 @@ watch("acpi", 10,
batteryType = "battery-empty%s-symbolic"
if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning
+ last_battery_check = time()
+
show_battery_warning()
end
elseif (charge >= 15 and charge < 40) then batteryType = "battery-caution%s-symbolic"
diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua
index 811eafe..48233f3 100644
--- a/batteryarc-widget/batteryarc.lua
+++ b/batteryarc-widget/batteryarc.lua
@@ -75,6 +75,8 @@ watch("acpi", 10,
batteryarc.colors = { beautiful.widget_red }
if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning
+ last_battery_check = time()
+
show_battery_warning()
end
elseif charge > 15 and charge < 40 then