summaryrefslogtreecommitdiff
path: root/jira-widget
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 /jira-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
parent21150bd640f086f617c61b32cde5e45ecfb5158f (diff)
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'jira-widget')
-rw-r--r--jira-widget/README.md1
-rw-r--r--jira-widget/jira.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/jira-widget/README.md b/jira-widget/README.md
index 5498085..04c7a2e 100644
--- a/jira-widget/README.md
+++ b/jira-widget/README.md
@@ -19,6 +19,7 @@ It is possible to customize widget by providing a table with all or some of the
| `host` | Required | Ex: _http://jira.tmnt.com_ |
| `query` | `jql=assignee=currentuser() AND resolution=Unresolved` | JQL query |
| `icon` | `~/.config/awesome/awesome-wm-widgets/jira-widget/jira-mark-gradient-blue.svg` | Path to the icon |
+| `timeout` | 10 | How often in seconds the widget refreshes |
## Installation
diff --git a/jira-widget/jira.lua b/jira-widget/jira.lua
index af85cf2..7f0ceb6 100644
--- a/jira-widget/jira.lua
+++ b/jira-widget/jira.lua
@@ -107,6 +107,7 @@ local function worker(args)
local icon = args.icon or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/jira-widget/jira-mark-gradient-blue.svg'
local host = args.host or show_warning('Jira host is unknown')
local query = args.query or 'jql=assignee=currentuser() AND resolution=Unresolved'
+ local timeout = args.timeout or 10
jira_widget:set_icon(icon)
@@ -229,7 +230,7 @@ local function worker(args)
)
)
watch(string.format(GET_ISSUES_CMD, host, query:gsub(' ', '+')),
- 10, update_widget, jira_widget)
+ timeout, update_widget, jira_widget)
return jira_widget
end