35 lines
795 B
Lua
35 lines
795 B
Lua
--- awesome stdlib
|
|
local gears = require("gears")
|
|
local awful = require("awful")
|
|
|
|
local _M = {}
|
|
------------------------------------------
|
|
function _M.get()
|
|
local global_buttons = gears.table.join(
|
|
--- 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)
|
|
)
|
|
return global_buttons
|
|
end
|
|
------------------------------------------
|
|
return setmetatable({}, {
|
|
__call = function(_, ...)
|
|
return _M.get(...)
|
|
end }) |