diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 674e5c0..d61195d 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -223,6 +223,11 @@ function keyhandler (mod, key, event) return false end +function focus_raise(direction) + awful.client.focus.bydirection(direction) + if client.focus then client.focus:raise() end +end + -- {{{ Key bindings local bind = keychain local sub = keychain.sub @@ -234,14 +239,11 @@ globalkeys = awful.util.table.join( if client.focus then client.focus:raise() end end), sub({ "Shift", }, "o", - function () - awful.screen.focus_relative(1) - end), - sub({ }, "f", - function () - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end) }), + function () awful.screen.focus_relative(1) end), + sub({ }, "f", function () focus_raise("right") end), + sub({ }, "b", function () focus_raise("left") end), + sub({ }, "n", function () focus_raise("down") end), + sub({ }, "p", function () focus_raise("up") end)}), awful.key({ modkey, }, "Left", awful.tag.viewprev ), awful.key({ modkey, }, "Right", awful.tag.viewnext ), awful.key({ modkey, }, "Escape", awful.tag.history.restore),