]> gitweb.fluxo.info Git - metadot.git/commitdiff
Awesome tab behavior
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 18:51:08 +0000 (16:51 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 18:51:08 +0000 (16:51 -0200)
modules/awesome/rc.lua

index 7235b386b8a9552797ba3c0013ef1a0b2fb48a78..f07400a5fd9931f30e1cd4a115c66f2dd9ee76d0 100644 (file)
@@ -190,9 +190,30 @@ 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),
+
+    --- Original tab behavior
+    ---awful.key({ modkey,           }, "Tab",
+    ---    function ()
+    ---        awful.client.focus.history.previous()
+    ---        if client.focus then
+    ---            client.focus:raise()
+    ---        end
+    ---    end),
+
+    --- Cyclic tab behavior
+    --- See http://stackoverflow.com/questions/11697102/awesome-alttab-just-switches-between-two-apps
+    awful.key({ modkey, "Shift"   }, "Tab",
+        function ()
+            -- awful.client.focus.history.previous()
+            awful.client.focus.byidx(-1)
+            if client.focus then
+                client.focus:raise()
+            end
+        end),
     awful.key({ modkey,           }, "Tab",
         function ()
-            awful.client.focus.history.previous()
+            -- awful.client.focus.history.previous()
+            awful.client.focus.byidx(1)
             if client.focus then
                 client.focus:raise()
             end