awesomerc/configuration/bindings/client_keybindings.lua

114 lines
3.0 KiB
Lua

local akey = require "awful.key"
local aclient = require "awful.client"
local utils = require "rc.configuration.bindings.utils"
local client_keybindings = {
akey {
modifiers = { utils.mods.modkey },
key = "f",
description = "toggle fullscreen",
group = utils.groups.client,
on_press = function(client)
client.fullscreen = not client.fullscreen
client:raise()
end,
},
akey {
modifiers = { utils.mods.modkey },
key = "c",
description = "close",
group = utils.groups.client,
on_press = function(client)
client:kill()
end,
},
akey {
modifiers = { utils.mods.modkey, utils.mods.control },
key = "space",
description = "toggle floating",
group = utils.groups.client,
on_press = aclient.floating.toggle,
},
akey {
modifiers = { utils.mods.modkey, utils.mods.control },
key = "Return",
description = "move to master",
group = utils.groups.client,
on_press = function(client)
client:swap(aclient.getmaster())
end,
},
akey {
modifiers = { utils.mods.modkey },
key = "o",
description = "move to screen",
group = utils.groups.client,
on_press = function(client)
client:move_to_screen()
end,
},
akey {
modifiers = { utils.mods.modkey },
key = "t",
description = "toggle keep on top",
group = utils.groups.client,
on_press = function(client)
client.ontop = not client.ontop
end,
},
akey {
modifiers = { utils.mods.modkey },
key = "n",
description = "minimize",
group = utils.groups.client,
on_press = 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,
},
akey {
modifiers = { utils.mods.modkey },
key = "m",
description = "(un)maximize",
group = utils.groups.client,
on_press = function(client)
client.maximized = not client.maximized
client:raise()
end,
},
akey {
modifiers = { utils.mods.modkey, utils.mods.control },
key = "m",
description = "(un)maximize vertically",
group = utils.groups.client,
on_press = function(client)
client.maximized_vertical = not client.maximized_vertical
client:raise()
end,
},
akey {
modifiers = { utils.mods.modkey, utils.mods.shift },
key = "m",
description = "(un)maximize horizontally",
group = utils.groups.client,
on_press = function(client)
client.maximized_horizontal = not client.maximized_horizontal
client:raise()
end,
},
}
return client_keybindings