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