I want dwm to close all windows gracefully when I press quit hotkey. I like Unity behaviour: it displays list of windows denying logout (for example, editors with unsaved changes) and do not logout before all issues are resolved and applications are closed. By default, dwm just end X session and all running applications are killed.
I was thinking about writing a script that will retrieve list of all windows, gracefully close them and wait for their processes to finish. But I even don't know how to close windows. The only way I know is using wmctrl, and this utility doesn't work with dwm.