1 -- Signal function to execute when a new client appears.
2 client.connect_signal("manage", function (c, startup)
4 -- Set the windows at the slave,
5 -- i.e. put it at the end of others instead of setting it master.
6 awful.client.setslave(c)
8 -- Put windows in a smart way, only if they does not set an initial position.
9 if not c.size_hints.user_position and not c.size_hints.program_position then
10 awful.placement.no_overlap(c)
11 awful.placement.no_offscreen(c)
13 elseif not c.size_hints.user_position and not c.size_hints.program_position then
14 -- Prevent clients from being unreachable after screen count change
15 awful.placement.no_offscreen(c)
19 -- Enable sloppy focus
20 client.connect_signal("mouse::enter", function(c)
21 if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
22 and awful.client.focus.filter(c) then
27 client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
28 client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)