fix(myawesomemenu) wrap callback in anon function

`awful.menu` calls function callback with default arguments from the
menu widget. It's safer to explicitly invoke callbacks without parameter
from an anonymous function.
This commit is contained in:
Aire-One 2021-12-26 18:27:16 +01:00
parent 6fd8406ac7
commit 67759f302d
1 changed files with 12 additions and 2 deletions

View File

@ -14,8 +14,18 @@ local myawesomemenu = {
}, },
{ "manual", applications.open_man "awesome" }, { "manual", applications.open_man "awesome" },
{ "edit config", applications.open_editor(capi.awesome.conffile) }, { "edit config", applications.open_editor(capi.awesome.conffile) },
{ "restart", capi.awesome.restart }, {
{ "quit", capi.awesome.quit }, "restart",
function()
capi.awesome.restart()
end,
},
{
"quit",
function()
capi.awesome.quit()
end,
},
} }
return myawesomemenu return myawesomemenu