dotfiles/awesome/bindings/mouse/global.lua

35 lines
795 B
Lua
Raw Normal View History

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:35:51 +00:00
------------------------------------------
2023-04-20 04:08:44 +00:00
function _M.get()
2023-05-23 05:12:23 +00:00
local global_buttons = gears.table.join(
2023-05-26 02:15:43 +00:00
--- hide menu [desktop::click]
awful.button({ }, 1,
function()
RC.mainmenu:hide()
end),
--- toggle menu [desktop::click_r]
awful.button({ }, 3,
function ()
RC.mainmenu:toggle()
end),
--- go to previous tag [desktop::scroll_u]
awful.button({ }, 4,
awful.tag.viewprev),
--- go to next tag [desktop::scroll_d]
awful.button({ }, 5,
awful.tag.viewnext)
2023-04-20 04:08:44 +00:00
)
2023-05-23 05:12:23 +00:00
return global_buttons
2023-04-20 04:08:44 +00:00
end
2023-05-23 05:35:51 +00:00
------------------------------------------
2023-05-26 02:15:43 +00:00
return setmetatable({}, {
__call = function(_, ...)
return _M.get(...)
end })