From 6bc99fe52f2fd9ca932b61da453951f15836d7cd Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 16 Apr 2016 05:51:25 -0400 Subject: [PATCH] awesomerc: Use rules to set the default position instead of "manage" This avoid a conflict when rules try to set overlapping geometry. --- awesomerc.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/awesomerc.lua b/awesomerc.lua index 72c6d01e..ad828d1d 100755 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -430,7 +430,10 @@ awful.rules.rules = { focus = awful.client.focus.filter, raise = true, keys = clientkeys, - buttons = clientbuttons } }, + buttons = clientbuttons, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, -- Floating clients. { rule_any = { @@ -472,17 +475,13 @@ awful.rules.rules = { -- {{{ Signals -- Signal function to execute when a new client appears. client.connect_signal("manage", function (c) - 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. - -- awful.client.setslave(c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end - -- Put windows in a smart way, only if they do not set an initial position. - if not c.size_hints.user_position and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end - elseif not c.size_hints.user_position and not c.size_hints.program_position then + if awesome.startup and + not c.size_hints.user_position + and not c.size_hints.program_position then -- Prevent clients from being unreachable after screen count changes. awful.placement.no_offscreen(c) end