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 -- open steam games on tag 9 and switch to it
20 awesome.register_xproperty("STEAM_GAME", "number")
21 client.connect_signal("manage", function (c)
22 local steam_game = c:get_xproperty("STEAM_GAME")
24 local tag = tags[1][9]
27 if steam_game ~= 769 then
28 -- 769 seems to be the value for the steam client itself
31 awful.placement.centered(mouse, {parent = c})
36 -- Enable sloppy focus
37 client.connect_signal("mouse::enter", function(c)
38 if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
39 and awful.client.focus.filter(c) then
44 client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
45 client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)