awful.menu: add __call on module

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-15 15:57:31 +02:00
parent fb68558b2f
commit 18e96e360d
2 changed files with 9 additions and 4 deletions

View File

@ -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 }
}
})

View File

@ -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