From 1b119b23e8d06ae9ec31326049722117b8f9b4c5 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 2 Apr 2024 19:19:56 +0200 Subject: Allow using arrow keys for moving around in Awesome My new QMK layout brings arrow keys into the home row under a specific layer, which in turn should make navigation with arrow keys quite reachable. --- .config/awesome/rc.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 3a37bba..045ed80 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -233,6 +233,18 @@ globalkeys = gears.table.join( awful.key({ modkey, }, "Escape", awful.tag.history.restore, {description = "go back", group = "tag"}), + awful.key({ modkey, }, "Down", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "Up", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), awful.key({ modkey, }, "j", function () awful.client.focus.byidx( 1) @@ -250,6 +262,13 @@ globalkeys = gears.table.join( -- Layout manipulation + awful.key({ modkey, "Shift" }, "Down", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "Up", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "Right", function () awful.screen.focus_bydirection("right") end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "Left", function () awful.screen.focus_bydirection("left") end, awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, {description = "swap with next client by index", group = "client"}), awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, -- cgit v1.1