awful.layout: call layout hook on layout set
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
332e2cb8e8
commit
e59f28a556
|
@ -23,6 +23,9 @@ local hooks = require("awful.hooks")
|
||||||
--- Layout module for awful
|
--- Layout module for awful
|
||||||
module("awful.layout")
|
module("awful.layout")
|
||||||
|
|
||||||
|
-- Create a hook to call when changing layout
|
||||||
|
hooks.user.create("layout")
|
||||||
|
|
||||||
--- Get the current layout.
|
--- Get the current layout.
|
||||||
-- @param screen The screen number.
|
-- @param screen The screen number.
|
||||||
-- @return The layout function.
|
-- @return The layout function.
|
||||||
|
@ -58,6 +61,7 @@ end
|
||||||
function set(layout, t)
|
function set(layout, t)
|
||||||
t = t or tag.selected()
|
t = t or tag.selected()
|
||||||
tag.setproperty(t, "layout", layout)
|
tag.setproperty(t, "layout", layout)
|
||||||
|
hooks.user.call("layout", t, layout)
|
||||||
capi.hooks.arrange()(t.screen)
|
capi.hooks.arrange()(t.screen)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue