From a2eddcdfcd87976866f797b5ad2b795495d2e620 Mon Sep 17 00:00:00 2001 From: Chris Bruce Date: Sat, 19 Sep 2020 01:08:15 -0700 Subject: Add widget timeouts --- volumebar-widget/volumebar.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'volumebar-widget') 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 -- cgit v1.2.3