From fff0b7e17d91f347353675437f30281cb1fca46c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 28 May 2021 15:24:41 +0200 Subject: bindings: add focusing clients by direction + focus master --- bindings.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/bindings.lua b/bindings.lua index 0b76c24..0e57026 100644 --- a/bindings.lua +++ b/bindings.lua @@ -65,6 +65,34 @@ function M.create(workspace) client.focus:raise() end end), + awful.key({ modkey, "Control" }, "j", + function () + awful.client.focus.bydirection("down") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Control" }, "k", + function () + awful.client.focus.bydirection("up") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Control" }, "l", + function () + awful.client.focus.bydirection("right") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Control" }, "h", + function () + awful.client.focus.bydirection("left") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Control" }, "Return", + function () + local c = awful.client.getmaster() + if c then + c:jump_to(false) + c:raise() + end + end), -- Layout manipulation awful.key({ modkey, }, "Return", -- cgit v1.2.3