awful.layout: use attached_add_signal
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d7a961175f
commit
26e2e2f375
|
@ -116,28 +116,21 @@ local function arrange_on_tagged(c, tag)
|
||||||
end
|
end
|
||||||
|
|
||||||
for s = 1, capi.screen.count() do
|
for s = 1, capi.screen.count() do
|
||||||
|
tag.attached_add_signal(s, "property::mwfact", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "property::nmaster", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "property::ncol", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "property::layout", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "property::windowfact", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "property::selected", arrange_prop)
|
||||||
|
tag.attached_add_signal(s, "tagged", arrange_prop)
|
||||||
capi.screen[s]:add_signal("property::workarea", function(screen)
|
capi.screen[s]:add_signal("property::workarea", function(screen)
|
||||||
arrange(screen.index)
|
arrange(screen.index)
|
||||||
end)
|
end)
|
||||||
capi.screen[s]:add_signal("tag::attach", function (screen, tag)
|
capi.screen[s]:add_signal("tag::attach", function (screen, tag)
|
||||||
arrange(screen.index)
|
arrange(screen.index)
|
||||||
tag:add_signal("property::mwfact", arrange_prop)
|
|
||||||
tag:add_signal("property::nmaster", arrange_prop)
|
|
||||||
tag:add_signal("property::ncol", arrange_prop)
|
|
||||||
tag:add_signal("property::layout", arrange_prop)
|
|
||||||
tag:add_signal("property::windowfact", arrange_prop)
|
|
||||||
tag:add_signal("property::selected", arrange_prop)
|
|
||||||
tag:add_signal("tagged", arrange_on_tagged)
|
|
||||||
end)
|
end)
|
||||||
capi.screen[s]:add_signal("tag::detach", function (screen, tag)
|
capi.screen[s]:add_signal("tag::detach", function (screen, tag)
|
||||||
arrange(screen.index)
|
arrange(screen.index)
|
||||||
tag:remove_signal("property::mwfact", arrange_prop)
|
|
||||||
tag:remove_signal("property::nmaster", arrange_prop)
|
|
||||||
tag:remove_signal("property::ncol", arrange_prop)
|
|
||||||
tag:remove_signal("property::layout", arrange_prop)
|
|
||||||
tag:remove_signal("property::windowfact", arrange_prop)
|
|
||||||
tag:remove_signal("property::selected", arrange_prop)
|
|
||||||
tag:remove_signal("tagged", arrange_on_tagged)
|
|
||||||
end)
|
end)
|
||||||
capi.screen[s]:add_signal("padding", arrange)
|
capi.screen[s]:add_signal("padding", arrange)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue