awful.menu: add __call on module
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
fb68558b2f
commit
18e96e360d
|
@ -102,7 +102,7 @@ myawesomemenu = {
|
|||
{ "quit", awesome.quit }
|
||||
}
|
||||
|
||||
mymainmenu = awful.menu.new({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||
{ "open terminal", terminal }
|
||||
}
|
||||
})
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
local pairs = pairs
|
||||
local table = table
|
||||
local type = type
|
||||
local setmetatable = setmetatable
|
||||
local wibox = wibox
|
||||
local image = image
|
||||
local widget = widget
|
||||
|
@ -369,3 +370,7 @@ function new(menu, parent, num)
|
|||
|
||||
return data
|
||||
end
|
||||
|
||||
setmetatable(_M, { __call = function(_, ...) return new(...) end })
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue