awesomerc: added menu stuff

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Damien Leone 2008-10-22 14:30:33 +02:00 committed by Julien Danjou
parent 4d5b43a75e
commit f58c878b96
1 changed files with 16 additions and 3 deletions

View File

@ -98,10 +98,23 @@ mytextbox = widget({ type = "textbox", name = "mytextbox", align = "right" })
-- Set the default text in textbox
mytextbox.text = "<b><small> " .. AWESOME_RELEASE .. " </small></b>"
-- Create a laucher widget
-- Create a laucher widget and a main menu
myawesomemenu = {
{"manual", terminal .. " -e man awesome"},
{"edit config", terminal .. " -e nano ~/.config/awesome/rc.lua"},
{"restart", "echo \"awesome.restart()\" | awesome-client"},
{"quit", "echo \"awesome.quit()\" | awesome-client"}
}
mymainmenu = {
{"awesome", myawesomemenu, "@AWESOME_ICON_PATH@/awesome16.png" },
{"open terminal", terminal}
}
mylauncher = awful.widget.launcher({ name = "mylauncher",
image = "@AWESOME_ICON_PATH@/awesome16.png",
command = terminal .. " -e man awesome"})
menu = {"mymainmenu", mymainmenu}
})
-- Create a systray
mysystray = widget({ type = "systray", name = "mysystray", align = "right" })
@ -158,7 +171,7 @@ end
-- {{{ Mouse bindings
awesome.buttons({
button({ }, 3, function () awful.util.spawn(terminal) end),
button({ }, 3, function () awful.menu.new("mymainmenu", mymainmenu) end),
button({ }, 4, awful.tag.viewnext),
button({ }, 5, awful.tag.viewprev)
})