dotfiles/awesome/binding/clientbuttons.lua

31 lines
904 B
Lua
Raw Normal View History

2023-04-20 04:08:44 +00:00
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
local _M = {}
local modkey = RC.vars.modkey
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function _M.get()
local clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end),
awful.button({ modkey }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c)
end)
)
return clientbuttons
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })