summaryrefslogtreecommitdiff
path: root/battery-widget
diff options
context:
space:
mode:
authorChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
committerChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
commita2eddcdfcd87976866f797b5ad2b795495d2e620 (patch)
treee3498520985e33915a211389951d6c0c971b972b /battery-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'battery-widget')
-rw-r--r--battery-widget/battery.lua3
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 = {}