-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.spawn(terminal) end):add()
-
-keybinding({ modkey, "Control" }, "r", awesome.restart):add()
-keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
-
--- Client manipulation
-keybinding({ modkey }, "m", awful.client.maximize):add()
-keybinding({ modkey, "Shift" }, "c", function () client.focus:kill() end):add()
-keybinding({ modkey }, "j", function () awful.client.focusbyidx(1); client.focus:raise() end):add()
-keybinding({ modkey }, "k", function () awful.client.focusbyidx(-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, awful.spawn, awful.completion.bash,
-os.getenv("HOME") .. "/.cache/awesome/history") end):add()
-keybinding({ modkey }, "F4", function ()
- awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox, awful.eval, awful.prompt.bash,
-os.getenv("HOME") .. "/.cache/awesome/history_eval") end):add()
-keybinding({ modkey, "Ctrl" }, "i", function ()
- if mypromptbox.text then
- mypromptbox.text = nil
- else
- mypromptbox.text = nil
- if client.focus.class then
- mypromptbox.text = "Class: " .. client.focus.class .. " "
- end
- if client.focus.instance then
- mypromptbox.text = mypromptbox.text .. "Instance: ".. client.focus.instance .. " "
- end
- if client.focus.role then
- mypromptbox.text = mypromptbox.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()