summaryrefslogtreecommitdiff
path: root/stackoverflow-widget
diff options
context:
space:
mode:
Diffstat (limited to 'stackoverflow-widget')
-rw-r--r--stackoverflow-widget/README.md1
-rw-r--r--stackoverflow-widget/stackoverflow.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/stackoverflow-widget/README.md b/stackoverflow-widget/README.md
index 23ed2c1..0098062 100644
--- a/stackoverflow-widget/README.md
+++ b/stackoverflow-widget/README.md
@@ -13,6 +13,7 @@ It is possible to customize widget by providing a table with all or some of the
| `icon`| `/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg` | Path to the icon |
| `limit` | 5 | Number of items to show in the widget |
| `tagged` | awesome-wm | Tag, or comma-separated tags |
+| `timeout` | 300 | How often in seconds the widget refreshes |
## Installation
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