summaryrefslogtreecommitdiff
path: root/volumebar-widget
diff options
context:
space:
mode:
Diffstat (limited to 'volumebar-widget')
-rw-r--r--volumebar-widget/README.md3
-rw-r--r--volumebar-widget/volumebar.lua3
2 files changed, 4 insertions, 2 deletions
diff --git a/volumebar-widget/README.md b/volumebar-widget/README.md
index b4a4578..305b254 100644
--- a/volumebar-widget/README.md
+++ b/volumebar-widget/README.md
@@ -20,7 +20,8 @@ It is possible to customize widget by providing a table with all or some of the
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
| `width` | 50 | The bar width |
| `shape` | `bar` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
-| `margin` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) |
+| `margins` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) |
+| `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/volumebar-widget/volumebar.lua b/volumebar-widget/volumebar.lua
index 827a3c0..19238de 100644
--- a/volumebar-widget/volumebar.lua
+++ b/volumebar-widget/volumebar.lua
@@ -32,6 +32,7 @@ local function worker(args)
local width = args.width or 50
local shape = args.shape or 'bar'
local margins = args.margins or 10
+ 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
@@ -77,7 +78,7 @@ local function worker(args)
end)
end)
- watch(get_volume_cmd, 1, update_graphic, volumebar_widget)
+ watch(get_volume_cmd, timeout, update_graphic, volumebar_widget)
return volumebar_widget
end