Awesome wm: pop yes / no dialog when killing a window

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,

+4
source share
1 answer

Awesome is written in lua, so all you need to know is to capture the exit status of the program executed by lua. See this question .

+2
source

Source: https://habr.com/ru/post/1439332/


All Articles