rc.lua.template: move mymainmenu to awful.util; closes #290
This commit is contained in:
parent
1875fde0a2
commit
5b5ae17393
|
@ -186,7 +186,7 @@ local myawesomemenu = {
|
||||||
{ "Quit", function() awesome.quit() end },
|
{ "Quit", function() awesome.quit() end },
|
||||||
}
|
}
|
||||||
|
|
||||||
local mymainmenu = freedesktop.menu.build {
|
awful.util.mymainmenu = freedesktop.menu.build {
|
||||||
before = {
|
before = {
|
||||||
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
|
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
|
||||||
-- other triads can be put here
|
-- other triads can be put here
|
||||||
|
@ -198,7 +198,7 @@ local mymainmenu = freedesktop.menu.build {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- hide menu when mouse leaves it
|
-- hide menu when mouse leaves it
|
||||||
--mymainmenu.wibox:connect_signal("mouse::leave", function() mymainmenu:hide() end)
|
--awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() awful.util.mymainmenu:hide() end)
|
||||||
|
|
||||||
-- Set the Menubar terminal for applications that require it
|
-- Set the Menubar terminal for applications that require it
|
||||||
--menubar.utils.terminal = terminal
|
--menubar.utils.terminal = terminal
|
||||||
|
@ -240,7 +240,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s)
|
||||||
-- {{{ Mouse bindings
|
-- {{{ Mouse bindings
|
||||||
|
|
||||||
root.buttons(mytable.join(
|
root.buttons(mytable.join(
|
||||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
awful.button({ }, 3, function () awful.util.mymainmenu:toggle() end),
|
||||||
awful.button({ }, 4, awful.tag.viewnext),
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
awful.button({ }, 5, awful.tag.viewprev)
|
awful.button({ }, 5, awful.tag.viewprev)
|
||||||
))
|
))
|
||||||
|
@ -321,7 +321,7 @@ globalkeys = mytable.join(
|
||||||
{description = "focus right", group = "client"}),
|
{description = "focus right", group = "client"}),
|
||||||
|
|
||||||
-- Menu
|
-- Menu
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
awful.key({ modkey, }, "w", function () awful.util.mymainmenu:show() end,
|
||||||
{description = "show main menu", group = "awesome"}),
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
|
|
Loading…
Reference in New Issue