No brattery - no pop up

This small change disables popup notifications when the battery is disconnected.
This commit is contained in:
Klimczewski 2022-02-22 18:33:36 +01:00 committed by GitHub
parent 90958abb48
commit e350548000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ local function worker(user_args)
level_widget.text = string.format('%d%%', charge) level_widget.text = string.format('%d%%', charge)
end end
if (charge >= 0 and charge < 15) then if (charge >= 1 and charge < 15) then
batteryType = "battery-empty%s-symbolic" batteryType = "battery-empty%s-symbolic"
if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning -- if 5 minutes have elapsed since the last warning