-keybinding({ modkey }, "Left", awful.tag.viewprev):add()
-keybinding({ modkey }, "Right", awful.tag.viewnext):add()
-keybinding({ modkey }, "Escape", awful.tag.history.restore):add()
-
--- Standard program
-keybinding({ modkey }, "Return", function () awful.util.spawn(terminal) end):add()
-
-keybinding({ modkey, "Control" }, "r", function ()
- mypromptbox[mouse.screen].text =
- awful.util.escape(awful.util.restart())
- end):add()
-keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
-
--- Client manipulation
-keybinding({ modkey }, "m", awful.client.maximize):add()
-keybinding({ modkey }, "f", function () client.focus.fullscreen = not client.focus.fullscreen end):add()
-keybinding({ modkey, "Shift" }, "c", function () client.focus:kill() end):add()
-keybinding({ modkey }, "j", function () awful.client.focus.byidx(1); client.focus:raise() end):add()
-keybinding({ modkey }, "k", function () awful.client.focus.byidx(-1); client.focus:raise() end):add()
-keybinding({ modkey, "Shift" }, "j", function () awful.client.swap(1) end):add()
-keybinding({ modkey, "Shift" }, "k", function () awful.client.swap(-1) end):add()
-keybinding({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add()
-keybinding({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add()
-keybinding({ modkey, "Control" }, "space", awful.client.togglefloating):add()
-keybinding({ modkey, "Control" }, "Return", function () client.focus:swap(awful.client.master()) end):add()
-keybinding({ modkey }, "o", awful.client.movetoscreen):add()
-keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add()
-keybinding({ modkey }, "u", awful.client.urgent.jumpto):add()
-keybinding({ modkey, "Shift" }, "r", function () client.focus:redraw() end):add()
-
--- Layout manipulation
-keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
-keybinding({ modkey }, "h", function () awful.tag.incmwfact(-0.05) end):add()
-keybinding({ modkey, "Shift" }, "h", function () awful.tag.incnmaster(1) end):add()
-keybinding({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end):add()
-keybinding({ modkey, "Control" }, "h", function () awful.tag.incncol(1) end):add()
-keybinding({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end):add()
-keybinding({ modkey }, "space", function () awful.layout.inc(layouts, 1) end):add()
-keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end):add()
-
--- Prompt
-keybinding({ modkey }, "F1", function ()
- awful.prompt.run({ prompt = "Run: " }, mypromptbox[mouse.screen], awful.util.spawn, awful.completion.bash,
- awful.util.getdir("cache") .. "/history")
- end):add()
-keybinding({ 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):add()
-
-keybinding({ modkey, "Ctrl" }, "i", function ()
- local s = mouse.screen
- if mypromptbox[s].text then
- mypromptbox[s].text = nil
- else
- mypromptbox[s].text = nil
- if client.focus.class then
- mypromptbox[s].text = "Class: " .. client.focus.class .. " "
- end
- if client.focus.instance then
- mypromptbox[s].text = mypromptbox[s].text .. "Instance: ".. client.focus.instance .. " "
- end
- if client.focus.role then
- mypromptbox[s].text = mypromptbox[s].text .. "Role: ".. client.focus.role
- end
- end
- end):add()
-
---- Tabulous, tab manipulation
-keybinding({ modkey, "Control" }, "y", function ()
- local tabbedview = tabulous.tabindex_get()
- local nextclient = awful.client.next(1)
-
- if not tabbedview then
- tabbedview = tabulous.tabindex_get(nextclient)
-
- if not tabbedview then
- tabbedview = tabulous.tab_create()
- tabulous.tab(tabbedview, nextclient)
- else
- tabulous.tab(tabbedview, client.focus)
- end
- else
- tabulous.tab(tabbedview, nextclient)
- end
-end):add()
-
-keybinding({ modkey, "Shift" }, "y", tabulous.untab):add()
-
-keybinding({ modkey }, "y", function ()
- local tabbedview = tabulous.tabindex_get()
-
- if tabbedview then
- local n = tabulous.next(tabbedview)
- tabulous.display(tabbedview, n)
- end
-end):add()
-
--- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
-keybinding({ modkey }, "t", awful.client.togglemarked):add()
-keybinding({ modkey, 'Shift' }, "t", function ()
- local tabbedview = tabulous.tabindex_get()
- local clients = awful.client.getmarked()