]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/bindings.lua
awesome: add binding to show awesompd notification
[dotfiles.git] / awesome / bindings.lua
index 6e06e674babdacb188c282407b16ae1fc8e89802..c57c87af7766776e20ae35f23e119616b0012715 100644 (file)
@@ -17,12 +17,12 @@ globalkeys = awful.util.table.join(globalkeys,
     -- Awesome Keys {{{2
     awful.key({ modkey,           }, "j",
         function ()
-            awful.client.focus.byidx( 1)
+            awful.client.focus.byidx(-1)
             if client.focus then client.focus:raise() end
         end),
     awful.key({ modkey,           }, "k",
         function ()
-            awful.client.focus.byidx(-1)
+            awful.client.focus.byidx( 1)
             if client.focus then client.focus:raise() end
         end),
 
@@ -136,11 +136,15 @@ for i = 1, 9 do
     globalkeys = awful.util.table.join(globalkeys,
         awful.key({ modkey }, "#" .. i + 9,
                   function ()
-                        local screen = mouse.screen
-                        local tag = awful.tag.gettags(screen)[i]
-                        if tag then
-                           awful.tag.viewonly(tag)
-                        end
+                    local screen = mouse.screen
+                    local tag = awful.tag.gettags(screen)[i]
+                    if tag then
+                      if tag == awful.tag.selected(screen) then
+                        awful.tag.history.restore(screen)
+                      else
+                        awful.tag.viewonly(tag)
+                      end
+                    end
                   end),
         awful.key({ modkey, "Control" }, "#" .. i + 9,
                   function ()