1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 03:02:32 +00:00

rc.lua.template: move mymainmenu to awful.util; closes #290

This commit is contained in:
Luca Capezzuto 2021-08-20 10:55:29 +02:00
parent 1875fde0a2
commit 5b5ae17393
No known key found for this signature in database
GPG key ID: 4E53F7C0EC846979

View file

@ -186,7 +186,7 @@ local myawesomemenu = {
{ "Quit", function() awesome.quit() end },
}
local mymainmenu = freedesktop.menu.build {
awful.util.mymainmenu = freedesktop.menu.build {
before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here
@ -198,7 +198,7 @@ local mymainmenu = freedesktop.menu.build {
}
-- 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
--menubar.utils.terminal = terminal
@ -240,7 +240,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s)
-- {{{ Mouse bindings
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({ }, 5, awful.tag.viewprev)
))
@ -321,7 +321,7 @@ globalkeys = mytable.join(
{description = "focus right", group = "client"}),
-- 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"}),
-- Layout manipulation