Merge pull request #542 from awesomeWM/actionless_keybindings
feat(awesomerc): add descriptions for some keybindings
This commit is contained in:
commit
48a57055dc
117
awesomerc.lua
117
awesomerc.lua
|
@ -227,47 +227,72 @@ root.buttons(awful.util.table.join(
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = awful.util.table.join(
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
{description = "view previous", group = "tag"}),
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||||
|
{description = "view next", group = "tag"}),
|
||||||
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||||
|
{description = "go back", group = "tag"}),
|
||||||
|
|
||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx( 1)
|
awful.client.focus.byidx( 1)
|
||||||
end),
|
end,
|
||||||
|
{description = "focus next by index", group = "client"}
|
||||||
|
),
|
||||||
awful.key({ modkey, }, "k",
|
awful.key({ modkey, }, "k",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
end),
|
end,
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end),
|
{description = "focus previous by index", group = "client"}
|
||||||
|
),
|
||||||
|
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||||
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
|
{description = "swap with next client by index", group = "client"}),
|
||||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
|
{description = "swap with previous client by index", group = "client"}),
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||||
|
{description = "focus the next screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||||
|
{description = "focus the previous screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||||
|
{description = "jump to urgent client", group = "client"}),
|
||||||
awful.key({ modkey, }, "Tab",
|
awful.key({ modkey, }, "Tab",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.history.previous()
|
awful.client.focus.history.previous()
|
||||||
if client.focus then
|
if client.focus then
|
||||||
client.focus:raise()
|
client.focus:raise()
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "go back", group = "client"}),
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end),
|
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
{description = "open a terminal", group = "launcher"}),
|
||||||
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||||
|
{description = "reload awesome", group = "awesome"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||||
|
{description = "quit awesome", group = "awesome"}),
|
||||||
|
|
||||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
|
||||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
|
{description = "increase master width factor", group = "layout"}),
|
||||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end),
|
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
|
||||||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end),
|
{description = "decrease master width factor", group = "layout"}),
|
||||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end),
|
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end),
|
{description = "increase the number of master clients", group = "layout"}),
|
||||||
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end),
|
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end),
|
{description = "decrease the number of master clients", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||||
|
{description = "increase the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
|
||||||
|
{description = "decrease the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
|
||||||
|
{description = "select next", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||||
|
{description = "select previous", group = "layout"}),
|
||||||
|
|
||||||
awful.key({ modkey, "Control" }, "n",
|
awful.key({ modkey, "Control" }, "n",
|
||||||
function ()
|
function ()
|
||||||
|
@ -277,10 +302,12 @@ globalkeys = awful.util.table.join(
|
||||||
client.focus = c
|
client.focus = c
|
||||||
c:raise()
|
c:raise()
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "restore minimized", group = "client"}),
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function () mypromptbox[awful.screen.focused()]:run() end),
|
awful.key({ modkey }, "r", function () mypromptbox[awful.screen.focused()]:run() end,
|
||||||
|
{description = "run prompt", group = "launcher"}),
|
||||||
|
|
||||||
awful.key({ modkey }, "x",
|
awful.key({ modkey }, "x",
|
||||||
function ()
|
function ()
|
||||||
|
@ -288,9 +315,11 @@ globalkeys = awful.util.table.join(
|
||||||
mypromptbox[awful.screen.focused()].widget,
|
mypromptbox[awful.screen.focused()].widget,
|
||||||
awful.util.eval, nil,
|
awful.util.eval, nil,
|
||||||
awful.util.getdir("cache") .. "/history_eval")
|
awful.util.getdir("cache") .. "/history_eval")
|
||||||
end),
|
end,
|
||||||
|
{description = "lua execute prompt", group = "awesome"}),
|
||||||
-- Menubar
|
-- Menubar
|
||||||
awful.key({ modkey }, "p", function() menubar.show() end)
|
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||||
|
{description = "show the menubar", group = "launcher"})
|
||||||
)
|
)
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
clientkeys = awful.util.table.join(
|
||||||
|
@ -299,22 +328,29 @@ clientkeys = awful.util.table.join(
|
||||||
c.fullscreen = not c.fullscreen
|
c.fullscreen = not c.fullscreen
|
||||||
c:raise()
|
c:raise()
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
|
||||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
{description = "close", group = "client"}),
|
||||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||||
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
{description = "toggle floating", group = "client"}),
|
||||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||||
|
{description = "move to master", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "o", awful.client.movetoscreen ,
|
||||||
|
{description = "move to screen", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||||
|
{description = "toggle keep on top", group = "client"}),
|
||||||
awful.key({ modkey, }, "n",
|
awful.key({ modkey, }, "n",
|
||||||
function (c)
|
function (c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- The client currently has the input focus, so it cannot be
|
||||||
-- minimized, since minimized clients can't have the focus.
|
-- minimized, since minimized clients can't have the focus.
|
||||||
c.minimized = true
|
c.minimized = true
|
||||||
end),
|
end ,
|
||||||
|
{description = "minimize", group = "client"}),
|
||||||
awful.key({ modkey, }, "m",
|
awful.key({ modkey, }, "m",
|
||||||
function (c)
|
function (c)
|
||||||
c.maximized = not c.maximized
|
c.maximized = not c.maximized
|
||||||
c:raise()
|
c:raise()
|
||||||
end)
|
end ,
|
||||||
|
{description = "maximize", group = "client"})
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
-- Bind all key numbers to tags.
|
||||||
|
@ -330,7 +366,8 @@ for i = 1, 9 do
|
||||||
if tag then
|
if tag then
|
||||||
awful.tag.viewonly(tag)
|
awful.tag.viewonly(tag)
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "view tag #"..i, group = "tag"}),
|
||||||
-- Toggle tag.
|
-- Toggle tag.
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -339,7 +376,8 @@ for i = 1, 9 do
|
||||||
if tag then
|
if tag then
|
||||||
awful.tag.viewtoggle(tag)
|
awful.tag.viewtoggle(tag)
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "toggle tag #" .. i, group = "tag"}),
|
||||||
-- Move client to tag.
|
-- Move client to tag.
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -349,7 +387,8 @@ for i = 1, 9 do
|
||||||
awful.client.movetotag(tag)
|
awful.client.movetotag(tag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "move focused client to tag #"..i, group = "tag"}),
|
||||||
-- Toggle tag.
|
-- Toggle tag.
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
|
@ -359,7 +398,9 @@ for i = 1, 9 do
|
||||||
awful.client.toggletag(tag)
|
awful.client.toggletag(tag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end))
|
end,
|
||||||
|
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
clientbuttons = awful.util.table.join(
|
clientbuttons = awful.util.table.join(
|
||||||
|
|
Loading…
Reference in New Issue