I am running a script which creates and closes several windows, hence, I added to my rc.lua a way to keep the window where I am working always on top:
awful.key({ modkey, "Control" }, "space",
function(c)
awful.client.floating.toggle()
c.ontop = not c.ontop
end),
The problem is:when the new window is created, I lose the focus, which passes to the new window.
Is there a way to make that the previous toggle not only keep the window on top, but also with the focus until I toggle it again?