diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-21 13:44:07 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-21 13:44:07 +0530 |
commit | cd2875ecca59ba77b23b99c2d28ecf28320af4a4 (patch) | |
tree | 8b2214ecd16b3c1493e0c05e55743047454c25bc | |
parent | fdd5c28ef885b7dc9dbdbf839b564793a07cf18b (diff) |
modified keybindings so now most of them follow the concept of a modkey
-rwxr-xr-x | awesome/rc.lua | 99 |
1 files changed, 35 insertions, 64 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua index 4e7c2987..aeb2053d 100755 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -273,22 +273,10 @@ multiMonitorNavKeys = gears.table.join( tagKeys = gears.table.join( -- cycle tabs using h and l - awful.key({ "Mod1", }, "h", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - awful.key({ "Mod1", }, "l", awful.tag.viewnext, - {description = "view next", group = "tag"}), - - -- move clients to prev/next tag - -- and focus said tag using h and l --- awful.key({ "Mod1", "Shift"}, "l", function () --- currentTag = client.focus.screen.tags --- naughty.notify(currentTag, currentTag) - -- end, {description = "", group = ""}), - - - awful.key({ "Mod1", }, "Tab", awful.tag.history.restore, - {description = "go back", group = "tag"}) - + awful.key({ "Mod1", }, "h", awful.tag.viewprev), + awful.key({ "Mod1", }, "l", awful.tag.viewnext), + -- go back to last tag + awful.key({ "Mod1", }, "Tab", awful.tag.history.restore) ) @@ -297,47 +285,41 @@ tagKeys = gears.table.join( -- keybindings to handle clients -- i.e minimizing, maximizing, hiding, closing windows clientkeys = gears.table.join( - awful.key({ modkey, }, "f", + -- kill client + awful.key({ modkey, "Shift", }, "c", function (c) c:kill() end), + -- toggle fulscreen + awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen c:raise() - end, - {description = "toggle fullscreen", group = "client"}), - awful.key({ "Mod1", }, "w", function (c) c:kill() end, - {description = "close", group = "client"}), - awful.key({ "Mod1" }, "i", awful.client.floating.toggle , - {description = "toggle floating", group = "client"}), - awful.key({ "Mod1", "Shift" }, "Return", function (c) c:swap(awful.client.getmaster()) end, - {description = "move to master", group = "client"}), - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), - awful.key({ "Mod1", }, "t", function (c) c.ontop = not c.ontop end, - {description = "toggle keep on top", group = "client"}), - awful.key({ "Mod1", "Shift" }, "o", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end , - {description = "minimize", group = "client"}), - awful.key({ "Mod1", }, "p", - function (c) + end), + + -- minimize focused client + awful.key({ modkey, }, "m", + function (c) c.minimized = true end), + -- unminimize clients + -- TODO: figure out how to unminimize clients + + -- float/unfloat window + awful.key({ modkey, }, "d", awful.client.floating.toggle), + -- keep window on top + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), + + -- (un)maximize client + awful.key({ modkey, }, "n", function (c) c.maximized = not c.maximized - c:raise() - end , - {description = "(un)maximize", group = "client"}), - awful.key({ "Mod4" }, "s", - function (c) + c:raise() end), + -- (un)maximize client vertically + awful.key({ modkey, }, "v", function (c) c.maximized_vertical = not c.maximized_vertical - c:raise() - end , - {description = "(un)maximize vertically", group = "client"}), - awful.key({ "Mod4" }, "a", - function (c) + c:raise() end), + -- (un)maximize client horizontally + awful.key({ modkey, }, "b", function (c) c.maximized_horizontal = not c.maximized_horizontal - c:raise() - end , - {description = "(un)maximize horizontally", group = "client"}) + c:raise() end), + + -- move client to master + awful.key({ modkey, "Shift" }, "Return", function (c) c:swap(awful.client.getmaster()) end) ) -- {{{ Key bindings @@ -366,19 +348,8 @@ globalkeys = gears.table.join( awful.key({ modkey, "Control" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}), awful.key({ modkey, "Shift" }, "q", awesome.quit, - {description = "quit awesome", group = "awesome"}), - - awful.key({ "Mod1", }, "o", - function () - local c = awful.client.restore() - -- Focus restored client - if c then - c:emit_signal( - "request::activate", "key.unminimize", {raise = true} - ) - end - end, - {description = "restore minimized", group = "client"}) + {description = "quit awesome", group = "awesome"}) + ) |