awesome: Revert bindings to pre-4.0 state (simpler)

master
Pierre Neidhardt 2017-04-14 18:06:50 +05:30
parent 8b45fb8bac
commit 5df0935fad
1 changed files with 25 additions and 32 deletions

View File

@ -251,7 +251,7 @@ move_mouse_away()
-- We reserve modkey+Mod1 for $EDITOR.
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}),
@ -270,9 +270,9 @@ globalkeys = awful.util.table.join(
),
-- 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,
{description = "swap with next client by index", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
{description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
@ -286,6 +286,15 @@ globalkeys = awful.util.table.join(
end
end,
{description = "go back", group = "client"}),
awful.key({ modkey }, "f",
function ()
if awful.layout.getname() == 'tile' then
awful.layout.set(awful.layout.suit.max)
else
awful.layout.set(awful.layout.suit.tile)
end
end,
{description = "toggle maximize", group = "screen"}),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
@ -297,7 +306,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "e", function () awful.spawn(os.getenv("EDITOR")) end,
{description="editor", group="launcher"}),
-- Mutt needs to be started in the folder where you want to save attachments.
awful.key({ modkey, }, "y", function () awful.spawn(terminal .. " -e sh -c 'cd ~/temp && mutt'") end,
awful.key({ modkey, }, "m", function () awful.spawn(terminal .. " -e sh -c 'cd ~/temp && mutt'") end,
{description="mail user agent", group="launcher"}),
awful.key({ modkey, }, "a", function () awful.spawn(terminal .. " -e cmus") end,
{description="music player", group="launcher"}),
@ -348,7 +357,7 @@ globalkeys = awful.util.table.join(
awful.key({ }, "XF86AudioMute", function () awful.util.spawn(audio_toggle) end,
{description = "toggle audio", group = "audio"}),
awful.key({ modkey, "Control" }, "n",
awful.key({ modkey }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
@ -362,44 +371,28 @@ globalkeys = awful.util.table.join(
awful.key({ modkey }, "x",
function ()
awful.prompt.run {
prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget,
prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval"
}
end,
{description = "lua execute prompt", group = "awesome"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
-- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"})
)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
awful.key({ modkey, "Shift" }, "f", function (c) c.fullscreen = not c.fullscreen end,
{description = "fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle,
awful.key({ modkey, }, "space", awful.client.floating.toggle,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
{description = "move to screen", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "maximize", group = "client"})
{description = "move to screen", group = "client"})
)
-- Bind all key numbers to tags.