summaryrefslogtreecommitdiff
path: root/jira-widget
diff options
context:
space:
mode:
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