2 root.buttons(awful.util.table.join(
3 awful.button({ }, 3, function () mymainmenu:toggle() end),
4 awful.button({ }, 4, awful.tag.viewnext),
5 awful.button({ }, 5, awful.tag.viewprev)
8 clientbuttons = awful.util.table.join(
9 awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
10 awful.button({ modkey }, 1, awful.mouse.client.move),
11 awful.button({ modkey }, 3, awful.mouse.client.resize))
15 globalkeys = awful.util.table.join(
16 awful.key({ modkey, }, "Left", awful.tag.viewprev ),
17 awful.key({ modkey, }, "Right", awful.tag.viewnext ),
18 awful.key({ modkey, }, "Escape", awful.tag.history.restore),
20 awful.key({ modkey, }, "j",
22 awful.client.focus.byidx( 1)
23 if client.focus then client.focus:raise() end
25 awful.key({ modkey, }, "k",
27 awful.client.focus.byidx(-1)
28 if client.focus then client.focus:raise() end
30 awful.key({ modkey }, "w", function () mymainmenu:show() end),
31 awful.key({ }, "F19", function () myshutdownmenu:show() end),
32 awful.key({ modkey }, "F1", function () myshutdownmenu:show() end),
34 -- Layout manipulation
35 awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
36 awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
37 awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
38 awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
39 awful.key({ modkey, "Control" }, "Left", function () awful.screen.focus_relative( 1) end),
40 awful.key({ modkey, "Control" }, "Right", function () awful.screen.focus_relative(-1) end),
41 awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
42 awful.key({ modkey, }, "Tab",
44 awful.client.focus.history.previous()
51 awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
52 awful.key({ modkey, "Control" }, "r", awesome.restart),
53 awful.key({ modkey, "Shift" }, "q", awesome.quit),
55 awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
56 awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
57 awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
58 awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
59 awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
60 awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
61 awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
62 awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
64 awful.key({ modkey, "Control" }, "n", awful.client.restore),
67 awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
69 awful.key({ modkey }, "x",
71 awful.prompt.run({ prompt = "Run Lua code: " },
72 mypromptbox[mouse.screen].widget,
74 awful.util.getdir("cache") .. "/history_eval")
77 awful.key({ modkey }, "p", function() menubar.show() end)
80 --awful.key({ }, "XF86AudioRaiseVolume", APW.Up),
81 --awful.key({ }, "XF86AudioLowerVolume", APW.Down),
82 --awful.key({ }, "XF86AudioMute", APW.ToggleMute)
85 clientkeys = awful.util.table.join(
86 awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
87 awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
88 awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
89 awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
90 awful.key({ modkey, }, "o", awful.client.movetoscreen ),
91 awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
92 awful.key({ modkey, }, "n",
94 -- The client currently has the input focus, so it cannot be
95 -- minimized, since minimized clients can't have the focus.
98 awful.key({ modkey, }, "m",
100 c.maximized_horizontal = not c.maximized_horizontal
101 c.maximized_vertical = not c.maximized_vertical
105 -- Bind all key numbers to tags.
106 -- Be careful: we use keycodes to make it works on any keyboard layout.
107 -- This should map on the top row of your keyboard, usually 1 to 9.
109 globalkeys = awful.util.table.join(globalkeys,
110 awful.key({ modkey }, "#" .. i + 9,
112 local screen = mouse.screen
113 local tag = awful.tag.gettags(screen)[i]
115 awful.tag.viewonly(tag)
118 awful.key({ modkey, "Control" }, "#" .. i + 9,
120 local screen = mouse.screen
121 local tag = awful.tag.gettags(screen)[i]
123 awful.tag.viewtoggle(tag)
126 awful.key({ modkey, "Shift" }, "#" .. i + 9,
128 local tag = awful.tag.gettags(client.focus.screen)[i]
129 if client.focus and tag then
130 awful.client.movetotag(tag)
133 awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
135 local tag = awful.tag.gettags(client.focus.screen)[i]
136 if client.focus and tag then
137 awful.client.toggletag(tag)
143 root.keys(globalkeys)