From cc2410d696b72b86851500f5afd857895e59f8b8 Mon Sep 17 00:00:00 2001 From: anakha Date: Fri, 28 May 2021 02:08:25 -0400 Subject: [PATCH] initial --- init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..956e32d --- /dev/null +++ b/init.lua @@ -0,0 +1,17 @@ +-- allows automatically focusing back to the previous client +-- on window close or minimize. + +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 + +client.connect_signal("property::minimized", backham) +-- attach to minimized state + +client.connect_signal("unmanage", backham) +-- attach to closed state \ No newline at end of file