From 7a728cec6b789f825df909498b5dfee8cc5f19a3 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Wed, 8 Feb 2017 13:50:58 +0100 Subject: [PATCH] awful.widget.watch: return timer too --- lib/awful/widget/watch.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/awful/widget/watch.lua b/lib/awful/widget/watch.lua index bc4c9af99..fe2af7fb2 100644 --- a/lib/awful/widget/watch.lua +++ b/lib/awful/widget/watch.lua @@ -62,7 +62,8 @@ local watch = { mt = {} } -- -- @param[opt=wibox.widget.textbox()] base_widget Base widget. -- --- @return The widget used by this watch +-- @return The widget used by this watch. +-- @return Its gears.timer. function watch.new(command, timeout, callback, base_widget) timeout = timeout or 5 base_widget = base_widget or textbox() @@ -79,7 +80,7 @@ function watch.new(command, timeout, callback, base_widget) end) t:start() t:emit_signal("timeout") - return base_widget + return base_widget, t end function watch.mt.__call(_, ...)