awful.menu: add __call on module
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
fb68558b2f
commit
18e96e360d
|
@ -102,10 +102,10 @@ myawesomemenu = {
|
||||||
{ "quit", awesome.quit }
|
{ "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 }
|
{ "open terminal", terminal }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
|
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
|
||||||
menu = mymainmenu })
|
menu = mymainmenu })
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local table = table
|
local table = table
|
||||||
local type = type
|
local type = type
|
||||||
|
local setmetatable = setmetatable
|
||||||
local wibox = wibox
|
local wibox = wibox
|
||||||
local image = image
|
local image = image
|
||||||
local widget = widget
|
local widget = widget
|
||||||
|
@ -369,3 +370,7 @@ function new(menu, parent, num)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
end
|
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