1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 03:02:32 +00:00

switch to parent window after closing child window

as gladly donated by @basaran
see https://github.com/lcpz/awesome-copycats/issues/301
This commit is contained in:
Konfekt 2022-12-25 21:06:44 +01:00 committed by GitHub
parent 80588112e1
commit 3da0546c90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -811,4 +811,21 @@ end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- switch to parent after closing child window
local function backham()
local s = awful.screen.focused()
local c = awful.client.focus.history.get(s, 0)
if c then
client.focus = c
c:raise()
end
end
-- attach to minimized state
client.connect_signal("property::minimized", backham)
-- attach to closed state
client.connect_signal("unmanage", backham)
-- ensure there is always a selected client during tag switching or logins
tag.connect_signal("property::selected", backham)
-- }}}