diff --git a/lib/awful/widget/graph.lua.in b/lib/awful/widget/graph.lua.in index 4f0ff910..4802a0dd 100644 --- a/lib/awful/widget/graph.lua.in +++ b/lib/awful/widget/graph.lua.in @@ -10,6 +10,7 @@ local math = math local table = table local capi = { image = image, widget = widget } +local layout = require("awful.widget.layout") --- A graph widget. module("awful.widget.graph") @@ -221,6 +222,8 @@ function new(args) graph["set_" .. prop] = _M["set_" .. prop] end + graph.layout = args.layout or layout.horizontal.leftright + return graph end diff --git a/lib/awful/widget/progressbar.lua.in b/lib/awful/widget/progressbar.lua.in index 2f151457..652a9495 100644 --- a/lib/awful/widget/progressbar.lua.in +++ b/lib/awful/widget/progressbar.lua.in @@ -9,6 +9,7 @@ local ipairs = ipairs local math = math local capi = { image = image, widget = widget } +local layout = require("awful.widget.layout") --- A progressbar widget. module("awful.widget.progressbar") @@ -171,6 +172,8 @@ function new(args) pbar["set_" .. prop] = _M["set_" .. prop] end + pbar.layout = args.layout or layout.horizontal.leftright + return pbar end