summaryrefslogtreecommitdiff
path: root/volumebar-widget
diff options
context:
space:
mode:
authorChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
committerChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
commita2eddcdfcd87976866f797b5ad2b795495d2e620 (patch)
treee3498520985e33915a211389951d6c0c971b972b /volumebar-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'volumebar-widget')
-rw-r--r--volumebar-widget/volumebar.lua3
1 files changed, 2 insertions, 1 deletions
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