Use signals on classes instead of instances where appropriate
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
23659817bc
commit
b4c83d0e70
|
@ -369,14 +369,6 @@ awful.rules.rules = {
|
|||
-- {{{ Signals
|
||||
-- Signal function to execute when a new client appears.
|
||||
client.connect_signal("manage", function (c)
|
||||
-- Enable sloppy focus
|
||||
c:connect_signal("mouse::enter", function(c)
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
client.focus = c
|
||||
end
|
||||
end)
|
||||
|
||||
if not awesome.startup then
|
||||
-- Set the windows at the slave,
|
||||
-- i.e. put it at the end of others instead of setting it master.
|
||||
|
@ -435,6 +427,14 @@ client.connect_signal("manage", function (c)
|
|||
end
|
||||
end)
|
||||
|
||||
-- Enable sloppy focus
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
client.focus = c
|
||||
end
|
||||
end)
|
||||
|
||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||
-- }}}
|
||||
|
|
|
@ -613,9 +613,7 @@ capi.client.connect_signal("new", function(c)
|
|||
c:connect_signal("property::border_width", store_init_geometry)
|
||||
end)
|
||||
|
||||
capi.client.connect_signal("manage", function(c)
|
||||
c:connect_signal("property::geometry", store_floating_geometry)
|
||||
end)
|
||||
capi.client.connect_signal("property::geometry", store_floating_geometry)
|
||||
|
||||
--- Return if a client has a fixe size or not.
|
||||
-- @param c The client.
|
||||
|
@ -958,7 +956,7 @@ capi.client.add_signal("unmarked")
|
|||
capi.client.connect_signal("focus", client.focus.history.add)
|
||||
capi.client.connect_signal("unmanage", client.focus.history.delete)
|
||||
|
||||
capi.client.connect_signal("manage", function(c) c:connect_signal("property::urgent", client.urgent.add) end)
|
||||
capi.client.connect_signal("property::urgent", client.urgent.add)
|
||||
capi.client.connect_signal("focus", client.urgent.delete)
|
||||
capi.client.connect_signal("unmanage", client.urgent.delete)
|
||||
|
||||
|
|
|
@ -567,10 +567,10 @@ capi.client.connect_signal("manage", function(c, startup)
|
|||
c.screen = capi.mouse.screen
|
||||
end
|
||||
end
|
||||
c:connect_signal("property::screen", tag.withcurrent)
|
||||
end)
|
||||
|
||||
capi.client.connect_signal("manage", tag.withcurrent)
|
||||
capi.client.connect_signal("property::screen", tag.withcurrent)
|
||||
capi.tag.connect_signal("request::select", tag.viewonly)
|
||||
|
||||
capi.tag.add_signal("property::hide")
|
||||
|
|
Loading…
Reference in New Issue