36 lines
991 B
Lua
36 lines
991 B
Lua
--- awesome stdlib
|
|
local gears = require("gears")
|
|
local awful = require("awful")
|
|
|
|
local _M = {}
|
|
------------------------------------------
|
|
function _M.get()
|
|
local client_buttons = gears.table.join(
|
|
--- focus client [client::click]
|
|
awful.button({ }, 1,
|
|
function(c)
|
|
c:emit_signal("request::activate", "mouse_click",
|
|
{raise = true})
|
|
end),
|
|
--- move client [client::mod+click]
|
|
awful.button({ modkey }, 1,
|
|
function(c)
|
|
c:emit_signal("request::activate", "mouse_click",
|
|
{raise = true})
|
|
awful.mouse.client.move(c)
|
|
end),
|
|
--- resize client [client::mod+click_r]
|
|
awful.button({ modkey }, 3,
|
|
function(c)
|
|
c:emit_signal("request::activate", "mouse_click",
|
|
{raise = true})
|
|
awful.mouse.client.resize(c)
|
|
end)
|
|
)
|
|
return client_buttons
|
|
end
|
|
------------------------------------------
|
|
return setmetatable({}, {
|
|
__call = function(_, ...)
|
|
return _M.get(...)
|
|
end }) |