From 7d658d84c44d6ce4e16c1dd06607402d5e7d2774 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 22 Sep 2017 08:57:00 +0200 Subject: different tab cycling --- config/awesome/rc.lua | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'config/awesome/rc.lua') diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 98f5fde..bbc4eea 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -11,6 +11,8 @@ local beautiful = require("beautiful") local naughty = require("naughty") local menubar = require("menubar") +local cyclefocus = require("cyclefocus") + -- Load Debian menu entries require("debian.menu") require("volume") @@ -251,13 +253,21 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), + --awful.key({ modkey, }, "Tab", + -- function () + -- awful.client.focus.history.previous() + -- if client.focus then + -- client.focus:raise() + -- end + -- end), + + --awful.key({ modkey }, "Tab", function(c) + -- cyclefocus.cycle({modifier="Super_L"}) + --end), + ---- modkey+Shift+Tab: backwards + --awful.key({ modkey, "Shift" }, "Tab", function(c) + -- cyclefocus.cycle({modifier="Super_L"}) + --end), -- Standard program -- awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end), @@ -510,6 +520,18 @@ clientkeys = awful.util.table.join( -- end end), + -- This must be a clientkeys mapping to have source_c available in the callback. + cyclefocus.key({ modkey }, "Tab", { + -- cycle_filters as a function callback: + -- cycle_filters = { function (c, source_c) return c.screen == source_c.screen end }, + + -- cycle_filters from the default filters: + --cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag }, + cycle_filters = { cyclefocus.filters.same_screen }, + modifier="Super_L", + keys = {'Tab', 'ISO_Left_Tab'} -- default, could be left out + }), + awful.key({ "Mod1" }, "Up" , function (c) c:raise() end), awful.key({ "Mod1" }, "Down" , function (c) c:lower() end), awful.key({ modkey }, ";" , function (c) c:raise() end), -- cgit v1.2.3