From 17b9514edb976334cc635f24916350907c1c80d8 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Tue, 29 Jun 2021 23:19:47 +0530 Subject: fixed window swapping not working in awesome --- .config/awesome/rc.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to '.config/awesome') diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 0103914..e3ffc11 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -250,10 +250,18 @@ globalkeys = gears.table.join( end), -- swapping clients with hjkl - awful.key({ modkey }, "j", awful.client.swap.bydirection("down")), - awful.key({ modkey }, "k", awful.client.swap.bydirection("up")), - awful.key({ modkey }, "h", awful.client.swap.bydirection("left")), - awful.key({ modkey }, "l", awful.client.swap.bydirection("right")), + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.bydirection("down") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.bydirection("up") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Shift" }, "h", function () awful.client.swap.bydirection("left") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, "Shift" }, "l", function () awful.client.swap.bydirection("right") + if client.focus then client.focus:raise() end + end), awful.key({ not_modkey, }, "j", function () -- cgit v1.2.3