summaryrefslogtreecommitdiff
path: root/volumearc-widget
diff options
context:
space:
mode:
Diffstat (limited to 'volumearc-widget')
-rw-r--r--volumearc-widget/README.md1
-rw-r--r--volumearc-widget/volumearc.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/volumearc-widget/README.md b/volumearc-widget/README.md
index ce5c95a..496797e 100644
--- a/volumearc-widget/README.md
+++ b/volumearc-widget/README.md
@@ -21,6 +21,7 @@ It is possible to customize widget by providing a table with all or some of the
| `path_to_icon` | /usr/share/icons/Arc/status/symbolic/audio-volume-muted-symbolic.svg | Path to the icon |
| `thickness` | 2 | The arc thickness |
| `height` | `beautiful.fg_normal` | Widget height |
+| `timeout` | 1 | How often in seconds the widget refreshes |
| `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level |
| `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level |
| `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level |
diff --git a/volumearc-widget/volumearc.lua b/volumearc-widget/volumearc.lua
index c582c10..91ae763 100644
--- a/volumearc-widget/volumearc.lua
+++ b/volumearc-widget/volumearc.lua
@@ -33,6 +33,7 @@ local function worker(args)
local path_to_icon = args.path_to_icon or PATH_TO_ICON
local thickness = args.thickness or 2
local height = args.height or 18
+ local timeout = args.timeout or 1
local get_volume_cmd = args.get_volume_cmd or GET_VOLUME_CMD
local inc_volume_cmd = args.inc_volume_cmd or INC_VOLUME_CMD
@@ -81,7 +82,7 @@ local function worker(args)
end
volumearc:connect_signal("button::press", button_press)
- watch(get_volume_cmd, 1, update_graphic, volumearc)
+ watch(get_volume_cmd, timeout, update_graphic, volumearc)
return volumearc
end