From 7fe61dd5d84e47c4f8dc5a3059711cfaa5253220 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Fri, 6 May 2022 16:15:23 +0200 Subject: Added windows like alt-tab to awesome WM + added some aliases --- awesome/.config/awesome/rc.lua | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'awesome/.config') diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index e6ca706..b567ff8 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -479,10 +479,28 @@ globalkeys = my_table.join( {description = "go back", group = "tag"}), -- Tag browsing alt + tab - awful.key({ altkey, }, "Tab", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ altkey, "Shift" }, "Tab", awful.tag.viewprev, - {description = "view previous", group = "tag"}), + -- awful.key({ altkey, }, "Tab", awful.tag.viewnext, + -- {description = "view next", group = "tag"}), + -- awful.key({ altkey, "Shift" }, "Tab", awful.tag.viewprev, + -- {description = "view previous", group = "tag"}), + + awful.key({ altkey, }, "Tab", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end), + awful.key({ altkey, "Shift" }, "Tab", + function () + -- awful.client.focus.history.previous() + awful.client.focus.byidx(1) + if client.focus then + client.focus:raise() + end + end), -- Tag browsing modkey + tab awful.key({ modkey, }, "Tab", awful.tag.viewnext, -- cgit v1.2.3