diff options
-rwxr-xr-x | awesome/rc.lua | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua index 750d14ec..9dad702c 100755 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -246,16 +246,9 @@ root.buttons(gears.table.join( )) -- }}} --- {{{ Key bindings -globalkeys = gears.table.join( - awful.key({ modkey, }, "s", hotkeys_popup.show_help, - {description="show help", group="awesome"}), - awful.key({ "Mod1", }, "h", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - awful.key({ "Mod1", }, "l", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ "Mod1", }, "Tab", awful.tag.history.restore, - {description = "go back", group = "tag"}), +-- for window navigation with hjkl +-- i.e vim movement keys +navKeys = gears.table.join( awful.key({ "Mod4" }, "j", function () awful.client.focus.bydirection("down") if client.focus then client.focus:raise() end end), @@ -267,8 +260,33 @@ globalkeys = gears.table.join( end), awful.key({ "Mod4" }, "l", function () awful.client.focus.bydirection("right") if client.focus then client.focus:raise() end - end), - + end) +) + +-- keybindings to navigate b/w monitors +-- uncomment multiMonitorNavKeys in +-- globalkeys to enable +multiMonitorNavKeys = gears.table.join( + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}) +) + + + +-- {{{ Key bindings +globalkeys = gears.table.join( + navKeys, + -- multiMonitorNavKeys, + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ "Mod1", }, "h", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ "Mod1", }, "l", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ "Mod1", }, "Tab", awful.tag.history.restore, + {description = "go back", group = "tag"}), -- Layout manipulation awful.key({ "Mod4", "Shift" }, "h", function () awful.client.swap.bydirection("left") end, {description = "move client to the left", group = "client"}), @@ -283,11 +301,7 @@ globalkeys = gears.table.join( - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, - {description = "focus the next screen", group = "screen"}), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, - {description = "focus the previous screen", group = "screen"}), - awful.key({ "Mod1", }, "u", awful.client.urgent.jumpto, + awful.key({ "Mod1", }, "u", awful.client.urgent.jumpto, {description = "jump to urgent client", group = "client"}), awful.key({ modkey, }, "Tab", function () |