summaryrefslogtreecommitdiff
path: root/stackoverflow-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 /stackoverflow-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'stackoverflow-widget')
-rw-r--r--stackoverflow-widget/stackoverflow.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/stackoverflow-widget/stackoverflow.lua b/stackoverflow-widget/stackoverflow.lua
index d89f246..af89105 100644
--- a/stackoverflow-widget/stackoverflow.lua
+++ b/stackoverflow-widget/stackoverflow.lua
@@ -29,6 +29,7 @@ local function worker(args)
local icon = args.icon or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg'
local limit = args.limit or 5
local tagged = args.tagged or 'awesome-wm'
+ local timeout = args.timeout or 300
local rows = {
{ widget = wibox.widget.textbox },
@@ -115,7 +116,7 @@ local function worker(args)
end)
)
)
- watch(string.format(GET_QUESTIONS_CMD, limit, tagged), 300, update_widget, stackoverflow_widget)
+ watch(string.format(GET_QUESTIONS_CMD, limit, tagged), timeout, update_widget, stackoverflow_widget)
return stackoverflow_widget
end