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:
parent
6fd8406ac7
commit
67759f302d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue