diff --git a/lib/awful/widget/graph.lua.in b/lib/awful/widget/graph.lua.in index 4802a0dd5..7ef756b93 100644 --- a/lib/awful/widget/graph.lua.in +++ b/lib/awful/widget/graph.lua.in @@ -164,6 +164,7 @@ local function add_value(graph, value) end update(graph) + return graph end @@ -175,6 +176,7 @@ local function set_height(graph, height) data[graph].height = height update(graph) end + return graph end --- Set the graph width. @@ -185,6 +187,7 @@ local function set_width(graph, width) data[graph].width = width update(graph) end + return graph end -- Build properties function @@ -193,6 +196,7 @@ for _, prop in ipairs(properties) do _M["set_" .. prop] = function(graph, value) data[graph][prop] = value update(graph) + return graph end end end diff --git a/lib/awful/widget/progressbar.lua.in b/lib/awful/widget/progressbar.lua.in index 652a94955..75111e418 100644 --- a/lib/awful/widget/progressbar.lua.in +++ b/lib/awful/widget/progressbar.lua.in @@ -116,6 +116,7 @@ end local function set_value(pbar, value) local value = value or 0 data[pbar].value = math.min(1, math.max(0, value)) + return pbar end --- Set the progressbar height. @@ -126,6 +127,7 @@ local function set_height(progressbar, height) data[progressbar].height = height update(progressbar) end + return progressbar end --- Set the progressbar width. @@ -136,6 +138,7 @@ local function set_width(progressbar, width) data[progressbar].width = width update(progressbar) end + return progressbar end -- Build properties function @@ -144,6 +147,7 @@ for _, prop in ipairs(properties) do _M["set_" .. prop] = function(pbar, value) data[pbar][prop] = value update(pbar) + return pbar end end end