transient_for checks for dual monitor
This commit is contained in:
parent
0c2327295c
commit
c1bd3fddd0
7
init.lua
7
init.lua
|
@ -72,7 +72,9 @@ local bindings = {
|
|||
awful.key({modkey, "Control"}, "]", my_shifter("forward", "swap")),
|
||||
--▨ swap
|
||||
|
||||
awful.key({modkey}, "'", shuffle("forward")),
|
||||
awful.key({modkey}, "'", function ()
|
||||
naughty.notify({text=inspect(client.focus.transient_for.screen)})
|
||||
end),
|
||||
--▨ shuffle
|
||||
|
||||
awful.key({modkey}, "j", focus_by_direction("left")),
|
||||
|
@ -147,6 +149,7 @@ end) --|during reload maximized clients get messed up, as machi
|
|||
|
||||
client.connect_signal("request::activate", function(c)
|
||||
c.hidden = false
|
||||
-- c.minimized = false
|
||||
c:raise()
|
||||
client.focus = c
|
||||
end) --|this is needed to ensure floating stuff becomes
|
||||
|
@ -172,7 +175,7 @@ if not (c.bypass or c.always_on) then
|
|||
return
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
--[[+]
|
||||
hide all floating windows when the user switches to a tiled
|
||||
client. This is handy when you have a floating browser
|
||||
|
|
|
@ -1250,6 +1250,14 @@ local function manage_signal(c)
|
|||
end, ci, c)
|
||||
end --|in case new client appears tiled
|
||||
--|we must update the regions tabbars.
|
||||
|
||||
if c.transient_for then
|
||||
c:move_to_screen(c.transient_for.screen)
|
||||
c:move_to_tag(awful.screen.focused().selected_tag)
|
||||
client.focus = c
|
||||
end --|when clients have a preset screen index with the rules,
|
||||
--|transient windows always open in that screen even if we
|
||||
--|moved it to the other one. this takes care of that.
|
||||
end
|
||||
end --[6]
|
||||
|
||||
|
|
Loading…
Reference in New Issue