+globalkeys =
+{
+ key({ modkey, }, "Left", awful.tag.viewprev ),
+ key({ modkey, }, "Right", awful.tag.viewnext ),
+ key({ modkey, }, "Escape", awful.tag.history.restore),
+
+ key({ modkey, }, "j",
+ function ()
+ awful.client.focus.byidx( 1)
+ if client.focus then client.focus:raise() end
+ end),
+ key({ modkey, }, "k",
+ function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then client.focus:raise() end
+ end),
+
+ -- Layout manipulation
+ key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
+ key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
+ key({ modkey, "Control" }, "j", function () awful.screen.focus( 1) end),
+ key({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end),
+ key({ modkey, }, "u", awful.client.urgent.jumpto),
+ key({ modkey, }, "Tab",
+ function ()
+ awful.client.focus.history.previous()
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+
+ -- Standard program
+ key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
+ key({ modkey, "Control" }, "r", awesome.restart),
+ key({ modkey, "Shift" }, "q", awesome.quit),
+
+ key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
+ key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
+ key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
+ key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
+ key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
+ key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
+ key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
+ key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
+
+ -- Prompt
+ key({ modkey }, "F1",
+ function ()
+ awful.prompt.run({ prompt = "Run: " },
+ mypromptbox[mouse.screen],
+ awful.util.spawn, awful.completion.bash,
+ awful.util.getdir("cache") .. "/history")
+ end),
+
+ key({ modkey }, "F4",
+ function ()
+ awful.prompt.run({ prompt = "Run Lua code: " },
+ mypromptbox[mouse.screen],
+ awful.util.eval, awful.prompt.bash,
+ awful.util.getdir("cache") .. "/history_eval")
+ end),
+}
+
+-- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
+clientkeys =
+{
+ key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
+ key({ modkey, "Shift" }, "c", function (c) c:kill() end),
+ key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
+ key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
+ key({ modkey, }, "o", awful.client.movetoscreen ),
+ key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
+ key({ modkey }, "t", awful.client.togglemarked),
+ key({ modkey,}, "m",
+ function (c)
+ if not awful.client.floating then
+ awful.client.floating.toggle()
+ end
+ c.maximized_horizontal = not c.maximized_horizontal
+ c.maximized_vertical = not c.maximized_vertical
+ end),
+}