-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.lua
30 lines (21 loc) · 842 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--+ allows automatically focusing back to the previous client
--> on window close (unmanage) or minimize.
-------------------------------------------------------------------> imports ;
local awful = require("awful")
-------------------------------------------------------------------> methods ;
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
--------------------------------------------------------------------> signal ;
client.connect_signal("property::minimized", backham)
--+ attach to minimized state
client.connect_signal("unmanage", backham)
--+ attach to closed state
tag.connect_signal("property::selected", backham)
--|ensure there is always a selected client during tag
--|switching or logins