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. -- We reserve modkey+Mod1 for $EDITOR.
globalkeys = awful.util.table.join( 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"}), {description="show help", group="awesome"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore, awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}), {description = "go back", group = "tag"}),
@ -270,9 +270,9 @@ globalkeys = awful.util.table.join(
), ),
-- 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,
{description = "swap with next client by index", group = "client"}), {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"}), {description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}), {description = "focus the next screen", group = "screen"}),
@ -286,6 +286,15 @@ globalkeys = awful.util.table.join(
end end
end, end,
{description = "go back", group = "client"}), {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 -- Standard program
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, 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, awful.key({ modkey, }, "e", function () awful.spawn(os.getenv("EDITOR")) end,
{description="editor", group="launcher"}), {description="editor", group="launcher"}),
-- Mutt needs to be started in the folder where you want to save attachments. -- 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"}), {description="mail user agent", group="launcher"}),
awful.key({ modkey, }, "a", function () awful.spawn(terminal .. " -e cmus") end, awful.key({ modkey, }, "a", function () awful.spawn(terminal .. " -e cmus") end,
{description="music player", group="launcher"}), {description="music player", group="launcher"}),
@ -348,7 +357,7 @@ globalkeys = awful.util.table.join(
awful.key({ }, "XF86AudioMute", function () awful.util.spawn(audio_toggle) end, awful.key({ }, "XF86AudioMute", function () awful.util.spawn(audio_toggle) end,
{description = "toggle audio", group = "audio"}), {description = "toggle audio", group = "audio"}),
awful.key({ modkey, "Control" }, "n", awful.key({ modkey }, "n",
function () function ()
local c = awful.client.restore() local c = awful.client.restore()
-- Focus restored client -- Focus restored client
@ -362,44 +371,28 @@ globalkeys = awful.util.table.join(
awful.key({ modkey }, "x", awful.key({ modkey }, "x",
function () function ()
awful.prompt.run { awful.prompt.run {
prompt = "Run Lua code: ", prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget, textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = awful.util.eval, exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval" history_path = awful.util.get_cache_dir() .. "/history_eval"
} }
end, end,
{description = "lua execute prompt", group = "awesome"}), {description = "lua execute prompt", group = "awesome"}),
-- Menubar -- Prompt
awful.key({ modkey }, "p", function() menubar.show() end, awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "show the menubar", group = "launcher"}) {description = "run prompt", group = "launcher"})
) )
clientkeys = awful.util.table.join( clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", awful.key({ modkey, "Shift" }, "f", function (c) c.fullscreen = not c.fullscreen end,
function (c) {description = "fullscreen", group = "client"}),
c.fullscreen = not c.fullscreen
c:raise() awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
{description = "close", group = "client"}), {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"}), {description = "toggle floating", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
{description = "move to screen", group = "client"}), {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"})
) )
-- Bind all key numbers to tags. -- Bind all key numbers to tags.