awesomerc/configuration/client_keybindings.lua

51 lines
2.0 KiB
Lua

local akey = require "awful.key"
local aclient = require "awful.client"
local control = "Control"
local modkey = "Mod4"
local shift = "Shift"
local client_keybindings = {
akey({ modkey }, "f", function(client)
client.fullscreen = not client.fullscreen
client:raise()
end, { description = "toggle fullscreen", group = "client" }),
akey({ modkey, shift }, "c", function(client)
client:kill()
end, { description = "close", group = "client" }),
akey(
{ modkey, control },
"space",
aclient.floating.toggle,
{ description = "toggle floating", group = "client" }
),
akey({ modkey, control }, "Return", function(client)
client:swap(aclient.getmaster())
end, { description = "move to master", group = "client" }),
akey({ modkey }, "o", function(client)
client:move_to_screen()
end, { description = "move to screen", group = "client" }),
akey({ modkey }, "t", function(client)
client.ontop = not client.ontop
end, { description = "toggle keep on top", group = "client" }),
akey({ modkey }, "n", function(client)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
client.minimized = true
end, { description = "minimize", group = "client" }),
akey({ modkey }, "m", function(client)
client.maximized = not client.maximized
client:raise()
end, { description = "(un)maximize", group = "client" }),
akey({ modkey, control }, "m", function(client)
client.maximized_vertical = not client.maximized_vertical
client:raise()
end, { description = "(un)maximize vertically", group = "client" }),
akey({ modkey, shift }, "m", function(client)
client.maximized_horizontal = not client.maximized_horizontal
client:raise()
end, { description = "(un)maximize horizontally", group = "client" }),
}
return client_keybindings