In awesome wm , when I press mod-q I will kill the current window. I would like to open the Yes / No dialog to confirm the action:
if zenity --question --title='Quit?' --text='Quit?'; then kill_the_window; fi
But the kill function is executed from the Lua code in rc.lua , and not from the shell.
awful.key({ modkey, }, "q", function (c) c:kill() end)
How to make awesome wait for zenity to exit before killing a window,
source share