diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-09-21 20:53:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 20:53:22 -0400 |
commit | 31213af0082bef8344475dbeb84205f1a7e31c7d (patch) | |
tree | 2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /stackoverflow-widget | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) | |
parent | 21150bd640f086f617c61b32cde5e45ecfb5158f (diff) |
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'stackoverflow-widget')
-rw-r--r-- | stackoverflow-widget/README.md | 1 | ||||
-rw-r--r-- | stackoverflow-widget/stackoverflow.lua | 3 |
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 |