forked from terceiro/awesome-freedesktop
-
Notifications
You must be signed in to change notification settings - Fork 25
Menu
Luke Bonham edited this page Jan 8, 2017
·
11 revisions
A Freedesktop.org-compliant applications menu.
mymainmenu = freedesktop.menu.build(args) -- this is an awful.menu
The input variable args
is a table and optional. It can contain 2 tables, before
and after
, which represent the entries to put before and after the retrieved ones.
mymainmenu = freedesktop.menu.build()
myawesomemenu = {
{ "hotkeys", function() return false, hotkeys_popup.show_help end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end }
}
mymainmenu = freedesktop.menu.build({
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
},
after = {
{ "Open terminal", terminal },
-- other triads can be put here
}
})
Just call build
with no arguments to feed the items
variable in your main awful.menu
with your system applications. Examples:
-- freedesktop entries only
mymainmenu = awful.menu({ items = freedesktop.menu.build() })
-- integrated in default rc.lua definition
myawesomemenu = {
{ "hotkeys", function() return false, hotkeys_popup.show_help end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end }
}
mymainmenu = awful.menu({
items = {
{ "awesome", myawesomemenu, beautiful.awesome_icon },
{ "applications", freedesktop.menu.build() },
{ "open terminal", terminal },
}
})
Home • Desktop icons • Menu