awesomerc: Use rules to set the default position instead of "manage"
This avoid a conflict when rules try to set overlapping geometry.
This commit is contained in:
parent
f5a27ab99b
commit
6bc99fe52f
|
@ -430,7 +430,10 @@ awful.rules.rules = {
|
||||||
focus = awful.client.focus.filter,
|
focus = awful.client.focus.filter,
|
||||||
raise = true,
|
raise = true,
|
||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons } },
|
buttons = clientbuttons,
|
||||||
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
-- Floating clients.
|
-- Floating clients.
|
||||||
{ rule_any = {
|
{ rule_any = {
|
||||||
|
@ -472,17 +475,13 @@ awful.rules.rules = {
|
||||||
-- {{{ Signals
|
-- {{{ Signals
|
||||||
-- Signal function to execute when a new client appears.
|
-- Signal function to execute when a new client appears.
|
||||||
client.connect_signal("manage", function (c)
|
client.connect_signal("manage", function (c)
|
||||||
if not awesome.startup then
|
|
||||||
-- Set the windows at the slave,
|
-- Set the windows at the slave,
|
||||||
-- i.e. put it at the end of others instead of setting it master.
|
-- i.e. put it at the end of others instead of setting it master.
|
||||||
-- awful.client.setslave(c)
|
-- 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 awesome.startup and
|
||||||
if not c.size_hints.user_position and not c.size_hints.program_position then
|
not c.size_hints.user_position
|
||||||
awful.placement.no_overlap(c)
|
and not c.size_hints.program_position then
|
||||||
awful.placement.no_offscreen(c)
|
|
||||||
end
|
|
||||||
elseif not c.size_hints.user_position and not c.size_hints.program_position then
|
|
||||||
-- Prevent clients from being unreachable after screen count changes.
|
-- Prevent clients from being unreachable after screen count changes.
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue