summaryrefslogtreecommitdiff
path: root/brightnessarc-widget
diff options
context:
space:
mode:
Diffstat (limited to 'brightnessarc-widget')
-rw-r--r--brightnessarc-widget/README.md1
-rw-r--r--brightnessarc-widget/brightnessarc.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/brightnessarc-widget/README.md b/brightnessarc-widget/README.md
index 5049e65..c27f366 100644
--- a/brightnessarc-widget/README.md
+++ b/brightnessarc-widget/README.md
@@ -14,6 +14,7 @@ It is possible to customize widget by providing a table with all or some of the
| `color` | `beautiful.fg_color` | Color of the arc |
| `bg_color` | `#ffffff11` | Color of the arc's background |
| `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon |
+| `timeout` | 1 | How often in seconds the widget refreshes |
### Example:
diff --git a/brightnessarc-widget/brightnessarc.lua b/brightnessarc-widget/brightnessarc.lua
index 6d3a769..ee93482 100644
--- a/brightnessarc-widget/brightnessarc.lua
+++ b/brightnessarc-widget/brightnessarc.lua
@@ -30,6 +30,7 @@ local function worker(args)
local color = args.color or beautiful.fg_color
local bg_color = args.bg_color or '#ffffff11'
local path_to_icon = args.path_to_icon or PATH_TO_ICON
+ local timeout = args.timeout or 1
local icon = {
id = "icon",
@@ -66,7 +67,7 @@ local function worker(args)
end
end)
- watch(get_brightness_cmd, 1, update_widget, widget)
+ watch(get_brightness_cmd, timeout, update_widget, widget)
return widget
end