aboutsummaryrefslogtreecommitdiff
path: root/awesome/rc.lua
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-20 22:00:06 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-20 22:00:06 +0530
commitd1aa54923941e3a55058e631d966ead6b9ed91af (patch)
tree4d33b9a7fbc138ecc4268630a999efdb06d20144 /awesome/rc.lua
parent9e6a93344d220ca906a22dbe2f317f9c39439cad (diff)
attempted to make keybindings config a bit more readable
Diffstat (limited to 'awesome/rc.lua')
-rwxr-xr-xawesome/rc.lua48
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 ()