summaryrefslogtreecommitdiff
path: root/battery-widget/battery.lua
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2020-09-21 20:53:22 -0400
committerGitHub <noreply@github.com>2020-09-21 20:53:22 -0400
commit31213af0082bef8344475dbeb84205f1a7e31c7d (patch)
tree2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /battery-widget/battery.lua
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
parent21150bd640f086f617c61b32cde5e45ecfb5158f (diff)
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'battery-widget/battery.lua')
-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 = {}