Browse Source

Try and focus no matter what

master
Yessiest 1 year ago
parent
commit
ecb870fd48
  1. 13
      modules/desktop.lua

13
modules/desktop.lua

@ -232,7 +232,8 @@ client.connect_signal("manage",function(c)
end
end)
end --}}}
-- Find a client to focus on
-- Find a client to focus on when switching tags
for s in screen do
for _,t in pairs(awful.tag.gettags(s)) do
t:connect_signal("property::selected", function(t)
@ -245,3 +246,13 @@ for s in screen do
end)
end
end
-- Focus on the previous client once the newer client is closed
client.connect_signal("unmanage",function(c)
local focused_clients = screen.primary.clients
local prev
for _,v in pairs(focused_clients) do
if v == c then break end
prev = v
end
client.focus = prev
end)
Loading…
Cancel
Save