diff --git a/init.lua b/init.lua index 05f3826..b65a8f0 100644 --- a/init.lua +++ b/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 diff --git a/methods.lua b/methods.lua index 1fb181d..fbdc0ea 100644 --- a/methods.lua +++ b/methods.lua @@ -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]