mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
awful.layout: use attached_add_signal
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d7a961175f
commit
26e2e2f375
1 changed files with 7 additions and 14 deletions
|
@ -116,28 +116,21 @@ local function arrange_on_tagged(c, tag)
|
|||
end
|
||||
|
||||
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)
|
||||
arrange(screen.index)
|
||||
end)
|
||||
capi.screen[s]:add_signal("tag::attach", function (screen, tag)
|
||||
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)
|
||||
capi.screen[s]:add_signal("tag::detach", function (screen, tag)
|
||||
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)
|
||||
capi.screen[s]:add_signal("padding", arrange)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue