diff options
author | Chris Bruce <aprofessionalemailaddress@gmail.com> | 2020-09-19 01:08:15 -0700 |
---|---|---|
committer | Chris Bruce <aprofessionalemailaddress@gmail.com> | 2020-09-19 01:08:15 -0700 |
commit | a2eddcdfcd87976866f797b5ad2b795495d2e620 (patch) | |
tree | e3498520985e33915a211389951d6c0c971b972b /battery-widget | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) |
Add widget timeouts
Diffstat (limited to 'battery-widget')
-rw-r--r-- | battery-widget/battery.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua index 919fb60..9fa50ed 100644 --- a/battery-widget/battery.lua +++ b/battery-widget/battery.lua @@ -33,6 +33,7 @@ local function worker(args) local display_notification = args.display_notification or false local position = args.notification_position or "top_right" + local timeout = args.timeout or 10 local warning_msg_title = args.warning_msg_title or 'Huston, we have a problem' local warning_msg_text = args.warning_msg_text or 'Battery is dying' @@ -116,7 +117,7 @@ local function worker(args) local last_battery_check = os.time() local batteryType = "battery-good-symbolic" - watch("acpi -i", 10, + watch("acpi -i", timeout, function(widget, stdout, stderr, exitreason, exitcode) local battery_info = {} local capacities = {} |