forked from terceiro/awesome-freedesktop
-
Notifications
You must be signed in to change notification settings - Fork 25
Menu
Luca CPZ edited this page Apr 13, 2021
·
11 revisions
A Freedesktop.org menu.
mymainmenu = freedesktop.menu.build() -- this is an awful.menu
Variable | Meaning | Type | Default |
---|---|---|---|
before |
Entries to put before the retrieved ones | table | empty table |
after |
Entries to put after the retrieved ones | table | empty table |
skip_items |
Entries not to be retrieved | table | empty table |
sub_menu |
Set the generated menu in its own entry | string or false | false |
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_cmd, 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