From 67759f302d35606d5e4caba10351e3ddeb3dbdec Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 26 Dec 2021 18:27:16 +0100 Subject: [PATCH] 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. --- configuration/menu/myawesomemenu.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configuration/menu/myawesomemenu.lua b/configuration/menu/myawesomemenu.lua index efc6da3..0bc8b37 100644 --- a/configuration/menu/myawesomemenu.lua +++ b/configuration/menu/myawesomemenu.lua @@ -14,8 +14,18 @@ local myawesomemenu = { }, { "manual", applications.open_man "awesome" }, { "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