<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -126,29 +126,39 @@ mywibox = {}
 mypromptbox = {}
 mylayoutbox = {}
 mytaglist = {}
-mytaglist.buttons = { button({ }, 1, awful.tag.viewonly),
-                      button({ modkey }, 1, awful.client.movetotag),
-                      button({ }, 3, function (tag) tag.selected = not tag.selected end),
-                      button({ modkey }, 3, awful.client.toggletag),
-                      button({ }, 4, awful.tag.viewnext),
-                      button({ }, 5, awful.tag.viewprev) }
+mytaglist.buttons = awful.util.table.join(
+                    awful.button({ }, 1, awful.tag.viewonly),
+                    awful.button({ modkey }, 1, awful.client.movetotag),
+                    awful.button({ }, 3, function (tag) tag.selected = not tag.selected end),
+                    awful.button({ modkey }, 3, awful.client.toggletag),
+                    awful.button({ }, 4, awful.tag.viewnext),
+                    awful.button({ }, 5, awful.tag.viewprev)
+                    )
 mytasklist = {}
-mytasklist.buttons = { button({ }, 1, function (c)
-                                          if not c:isvisible() then
-                                              awful.tag.viewonly(c:tags()[1])
-                                          end
-                                          client.focus = c
-                                          c:raise()
-                                      end),
-                       button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end),
-                       button({ }, 4, function ()
-                                          awful.client.focus.byidx(1)
-                                          if client.focus then client.focus:raise() end
-                                      end),
-                       button({ }, 5, function ()
-                                          awful.client.focus.byidx(-1)
-                                          if client.focus then client.focus:raise() end
-                                      end) }
+mytasklist.buttons = awful.util.table.join(
+                     awful.button({ }, 1, function (c)
+                                              if not c:isvisible() then
+                                                  awful.tag.viewonly(c:tags()[1])
+                                              end
+                                              client.focus = c
+                                              c:raise()
+                                          end),
+                     awful.button({ }, 3, function ()
+                                              if instance then
+                                                  instance:hide()
+                                                  instance = nil
+                                              else
+                                                  instance = awful.menu.clients({ width=250 })
+                                              end
+                                          end),
+                     awful.button({ }, 4, function ()
+                                              awful.client.focus.byidx(1)
+                                              if client.focus then client.focus:raise() end
+                                          end),
+                     awful.button({ }, 5, function ()
+                                              awful.client.focus.byidx(-1)
+                                              if client.focus then client.focus:raise() end
+                                          end))
 
 for s = 1, screen.count() do
     -- Create a promptbox for each screen
@@ -156,10 +166,11 @@ for s = 1, screen.count() do
     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
     -- We need one layoutbox per screen.
     mylayoutbox[s] = widget({ type = &quot;imagebox&quot;, align = &quot;right&quot; })
-    mylayoutbox[s]:buttons({ button({ }, 1, function () awful.layout.inc(layouts, 1) end),
-                             button({ }, 3, function () awful.layout.inc(layouts, -1) end),
-                             button({ }, 4, function () awful.layout.inc(layouts, 1) end),
-                             button({ }, 5, function () awful.layout.inc(layouts, -1) end) })
+    mylayoutbox[s]:buttons(awful.util.table.join(
+                           awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
+                           awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
+                           awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
+                           awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
     -- Create a taglist widget
     mytaglist[s] = awful.widget.taglist.new(s, awful.widget.taglist.label.all, mytaglist.buttons)
 
@@ -183,37 +194,37 @@ end
 -- }}}
 
 -- {{{ Mouse bindings
-root.buttons({
-    button({ }, 4, awful.tag.viewnext),
-    button({ }, 5, awful.tag.viewprev)
-})
+root.buttons(awful.util.table.join(
+    awful.button({ }, 3, function () mymainmenu:toggle() end),
+    awful.button({ }, 4, awful.tag.viewnext),
+    awful.button({ }, 5, awful.tag.viewprev)
+))
 -- }}}
 
 -- {{{ Key bindings
-globalkeys =
-{
-    key({ modkey,           }, &quot;Left&quot;,   awful.tag.viewprev       ),
-    key({ modkey,           }, &quot;Right&quot;,  awful.tag.viewnext       ),
-    key({ modkey,           }, &quot;Escape&quot;, awful.tag.history.restore),
+globalkeys = awful.util.table.join(
+    awful.key({ modkey,           }, &quot;Left&quot;,   awful.tag.viewprev       ),
+    awful.key({ modkey,           }, &quot;Right&quot;,  awful.tag.viewnext       ),
+    awful.key({ modkey,           }, &quot;Escape&quot;, awful.tag.history.restore),
 
-    key({ modkey,           }, &quot;j&quot;,
+    awful.key({ modkey,           }, &quot;j&quot;,
         function ()
             awful.client.focus.byidx( 1)
             if client.focus then client.focus:raise() end
         end),
-    key({ modkey,           }, &quot;k&quot;,
+    awful.key({ modkey,           }, &quot;k&quot;,
         function ()
             awful.client.focus.byidx(-1)
             if client.focus then client.focus:raise() end
         end),
 
     -- Layout manipulation
-    key({ modkey, &quot;Shift&quot;   }, &quot;j&quot;, function () awful.client.swap.byidx(  1) end),
-    key({ modkey, &quot;Shift&quot;   }, &quot;k&quot;, function () awful.client.swap.byidx( -1) end),
-    key({ modkey, &quot;Control&quot; }, &quot;j&quot;, function () awful.screen.focus( 1)       end),
-    key({ modkey, &quot;Control&quot; }, &quot;k&quot;, function () awful.screen.focus(-1)       end),
-    key({ modkey,           }, &quot;u&quot;, awful.client.urgent.jumpto),
-    key({ modkey,           }, &quot;Tab&quot;,
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;j&quot;, function () awful.client.swap.byidx(  1) end),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;k&quot;, function () awful.client.swap.byidx( -1) end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;j&quot;, function () awful.screen.focus( 1)       end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;k&quot;, function () awful.screen.focus(-1)       end),
+    awful.key({ modkey,           }, &quot;u&quot;, awful.client.urgent.jumpto),
+    awful.key({ modkey,           }, &quot;Tab&quot;,
         function ()
             awful.client.focus.history.previous()
             if client.focus then
@@ -222,53 +233,52 @@ globalkeys =
         end),
 
     -- Standard program
-    key({ modkey,           }, &quot;Return&quot;, function () awful.util.spawn(terminal) end),
-    key({ modkey, &quot;Control&quot; }, &quot;r&quot;, awesome.restart),
-    key({ modkey, &quot;Shift&quot;   }, &quot;q&quot;, awesome.quit),
-
-    key({ modkey,           }, &quot;l&quot;,     function () awful.tag.incmwfact( 0.05)    end),
-    key({ modkey,           }, &quot;h&quot;,     function () awful.tag.incmwfact(-0.05)    end),
-    key({ modkey, &quot;Shift&quot;   }, &quot;h&quot;,     function () awful.tag.incnmaster( 1)      end),
-    key({ modkey, &quot;Shift&quot;   }, &quot;l&quot;,     function () awful.tag.incnmaster(-1)      end),
-    key({ modkey, &quot;Control&quot; }, &quot;h&quot;,     function () awful.tag.incncol( 1)         end),
-    key({ modkey, &quot;Control&quot; }, &quot;l&quot;,     function () awful.tag.incncol(-1)         end),
-    key({ modkey,           }, &quot;space&quot;, function () awful.layout.inc(layouts,  1) end),
-    key({ modkey, &quot;Shift&quot;   }, &quot;space&quot;, function () awful.layout.inc(layouts, -1) end),
+    awful.key({ modkey,           }, &quot;Return&quot;, function () awful.util.spawn(terminal) end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;r&quot;, awesome.restart),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;q&quot;, awesome.quit),
+
+    awful.key({ modkey,           }, &quot;l&quot;,     function () awful.tag.incmwfact( 0.05)    end),
+    awful.key({ modkey,           }, &quot;h&quot;,     function () awful.tag.incmwfact(-0.05)    end),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;h&quot;,     function () awful.tag.incnmaster( 1)      end),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;l&quot;,     function () awful.tag.incnmaster(-1)      end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;h&quot;,     function () awful.tag.incncol( 1)         end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;l&quot;,     function () awful.tag.incncol(-1)         end),
+    awful.key({ modkey,           }, &quot;space&quot;, function () awful.layout.inc(layouts,  1) end),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;space&quot;, function () awful.layout.inc(layouts, -1) end),
 
     -- Prompt
-    key({ modkey }, &quot;F1&quot;,
-        function ()
-            awful.prompt.run({ prompt = &quot;Run: &quot; },
-            mypromptbox[mouse.screen],
-            awful.util.spawn, awful.completion.bash,
-            awful.util.getdir(&quot;cache&quot;) .. &quot;/history&quot;)
-        end),
-
-    key({ modkey }, &quot;F4&quot;,
-        function ()
-            awful.prompt.run({ prompt = &quot;Run Lua code: &quot; },
-            mypromptbox[mouse.screen],
-            awful.util.eval, awful.prompt.bash,
-            awful.util.getdir(&quot;cache&quot;) .. &quot;/history_eval&quot;)
-        end),
-}
+    awful.key({ modkey }, &quot;r&quot;,
+              function ()
+                  awful.prompt.run({ prompt = &quot;Run: &quot; },
+                  mypromptbox[mouse.screen],
+                  awful.util.spawn, awful.completion.shell,
+                  awful.util.getdir(&quot;cache&quot;) .. &quot;/history&quot;)
+              end),
+
+    awful.key({ modkey }, &quot;x&quot;,
+              function ()
+                  awful.prompt.run({ prompt = &quot;Run Lua code: &quot; },
+                  mypromptbox[mouse.screen],
+                  awful.util.eval, nil,
+                  awful.util.getdir(&quot;cache&quot;) .. &quot;/history_eval&quot;)
+              end)
+)
 
 -- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
-clientkeys =
-{
-    key({ modkey,           }, &quot;f&quot;,      function (c) c.fullscreen = not c.fullscreen  end),
-    key({ modkey, &quot;Shift&quot;   }, &quot;c&quot;,      function (c) c:kill()                         end),
-    key({ modkey, &quot;Control&quot; }, &quot;space&quot;,  awful.client.floating.toggle                     ),
-    key({ modkey, &quot;Control&quot; }, &quot;Return&quot;, function (c) c:swap(awful.client.getmaster()) end),
-    key({ modkey,           }, &quot;o&quot;,      awful.client.movetoscreen                        ),
-    key({ modkey, &quot;Shift&quot;   }, &quot;r&quot;,      function (c) c:redraw()                       end),
-    key({ modkey }, &quot;t&quot;, awful.client.togglemarked),
-    key({ modkey,}, &quot;m&quot;,
+clientkeys = awful.util.table.join(
+    awful.key({ modkey,           }, &quot;f&quot;,      function (c) c.fullscreen = not c.fullscreen  end),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;c&quot;,      function (c) c:kill()                         end),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;space&quot;,  awful.client.floating.toggle                     ),
+    awful.key({ modkey, &quot;Control&quot; }, &quot;Return&quot;, function (c) c:swap(awful.client.getmaster()) end),
+    awful.key({ modkey,           }, &quot;o&quot;,      awful.client.movetoscreen                        ),
+    awful.key({ modkey, &quot;Shift&quot;   }, &quot;r&quot;,      function (c) c:redraw()                       end),
+    awful.key({ modkey }, &quot;t&quot;, awful.client.togglemarked),
+    awful.key({ modkey,}, &quot;m&quot;,
         function (c)
             c.maximized_horizontal = not c.maximized_horizontal
             c.maximized_vertical   = not c.maximized_vertical
-        end),
-}
+        end)
+)
 
 -- Compute the maximum number of digit we need, limited to 9
 keynumber = 0
@@ -277,49 +287,41 @@ for s = 1, screen.count() do
 end
 
 for i = 1, keynumber do
-    table.insert(globalkeys,
-        key({ modkey }, i,
-            function ()
-                local screen = mouse.screen
-                if tags[screen][i] then
-                    awful.tag.viewonly(tags[screen][i])
-                end
-            end))
-    table.insert(globalkeys,
-        key({ modkey, &quot;Control&quot; }, i,
-            function ()
-                local screen = mouse.screen
-                if tags[screen][i] then
-                    tags[screen][i].selected = not tags[screen][i].selected
-                end
-            end))
-    table.insert(globalkeys,
-        key({ modkey, &quot;Shift&quot; }, i,
-            function ()
-                if client.focus and tags[client.focus.screen][i] then
-                    awful.client.movetotag(tags[client.focus.screen][i])
-                end
-            end))
-    table.insert(globalkeys,
-        key({ modkey, &quot;Control&quot;, &quot;Shift&quot; }, i,
-            function ()
-                if client.focus and tags[client.focus.screen][i] then
-                    awful.client.toggletag(tags[client.focus.screen][i])
-                end
-            end))
-end
-
-
-for i = 1, keynumber do
-    table.insert(globalkeys, key({ modkey, &quot;Shift&quot; }, &quot;F&quot; .. i,
-                 function ()
-                     local screen = mouse.screen
-                     if tags[screen][i] then
-                         for k, c in pairs(awful.client.getmarked()) do
-                             awful.client.movetotag(tags[screen][i], c)
-                         end
-                     end
-                 end))
+    table.foreach(awful.key({ modkey }, i,
+                  function ()
+                        local screen = mouse.screen
+                        if tags[screen][i] then
+                            awful.tag.viewonly(tags[screen][i])
+                        end
+                  end), function(_, k) table.insert(globalkeys, k) end)
+    table.foreach(awful.key({ modkey, &quot;Control&quot; }, i,
+                  function ()
+                      local screen = mouse.screen
+                      if tags[screen][i] then
+                          tags[screen][i].selected = not tags[screen][i].selected
+                      end
+                  end), function(_, k) table.insert(globalkeys, k) end)
+    table.foreach(awful.key({ modkey, &quot;Shift&quot; }, i,
+                  function ()
+                      if client.focus and tags[client.focus.screen][i] then
+                          awful.client.movetotag(tags[client.focus.screen][i])
+                      end
+                  end), function(_, k) table.insert(globalkeys, k) end)
+    table.foreach(awful.key({ modkey, &quot;Control&quot;, &quot;Shift&quot; }, i,
+                  function ()
+                      if client.focus and tags[client.focus.screen][i] then
+                          awful.client.toggletag(tags[client.focus.screen][i])
+                      end
+                  end), function(_, k) table.insert(globalkeys, k) end)
+    table.foreach(awful.key({ modkey, &quot;Shift&quot; }, &quot;F&quot; .. i,
+                  function ()
+                      local screen = mouse.screen
+                      if tags[screen][i] then
+                          for k, c in pairs(awful.client.getmarked()) do
+                              awful.client.movetotag(tags[screen][i], c)
+                          end
+                      end
+                   end), function(_, k) table.insert(globalkeys, k) end)
 end
 
 -- Set keys
@@ -374,11 +376,11 @@ awful.hooks.manage.register(function (c, startup)
         awful.titlebar.add(c, { modkey = modkey })
     end
     -- Add mouse bindings
-    c:buttons({
-        button({ }, 1, function (c) client.focus = c; c:raise() end),
-        button({ modkey }, 1, awful.mouse.client.move),
-        button({ modkey }, 3, awful.mouse.client.resize)
-    })
+    c:buttons(awful.util.table.join(
+        awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
+        awful.button({ modkey }, 1, awful.mouse.client.move),
+        awful.button({ modkey }, 3, awful.mouse.client.resize)
+    ))
     -- New client may not receive focus
     -- if they're not focusable, so set border anyway.
     c.border_width = beautiful.border_width</diff>
      <filename>.config/awesome/rc.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a9ca9adc924218b6093d8bcf739faae78283b8ba</id>
    </parent>
  </parents>
  <author>
    <name>qiukun</name>
    <email>qykcdgm@gmail.com</email>
  </author>
  <url>http://github.com/qiukun/hmandcon/commit/14ee39092dc3d3bd3395eea1f4cfe6ce58cd2d3c</url>
  <id>14ee39092dc3d3bd3395eea1f4cfe6ce58cd2d3c</id>
  <committed-date>2009-05-23T05:30:27-07:00</committed-date>
  <authored-date>2009-05-23T05:30:27-07:00</authored-date>
  <message>awesome update</message>
  <tree>1a35364634ec44837478a104f6d4d4614d62696c</tree>
  <committer>
    <name>qiukun</name>
    <email>qykcdgm@gmail.com</email>
  </committer>
</commit>
