index.md - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       index.md (1296B)
       ---
            1 onlyquitonempty
            2 ===============
            3 
            4 Description
            5 -----------
            6 On the default keybinding of Mod-Shift-Q, it is possible to press it by
            7 accident, closing all your work. This patch makes it so dwm will only exit if
            8 no windows are open.
            9 
           10 You probably have various other "windows" open according to the X server; this
           11 includes not only a panel, but often also settings daemons, notification
           12 daemons, odd scripts, or other X utilities. As a result, you will probably need
           13 to consider changing `EMPTY_WINDOW_COUNT` to a number that works best for you.
           14 You can get a list of open X windows with `xwininfo -tree -root`. The command
           15 `xwininfo -tree -root | grep child | head -1` with an empty desktop should get
           16 you most of the way there (although of course your terminal is open). Be
           17 prepared to recompile a few times to test!
           18 
           19 Version two adds an override shortcut as Ctrl-Mod-Shift-Q; this is obviously
           20 configurable in config.h. It also removes a useless allocation, which could
           21 even potentially be overflowed (`sizeof(Window) > 1`).
           22 
           23 Download
           24 --------
           25 * [dwm-onlyquitonempty-20201204-61bb8b2.diff (version 2)](dwm-onlyquitonempty-20201204-61bb8b2.diff)
           26 * [dwm-onlyquitonempty-20180428-6.2.diff (version 1)](dwm-onlyquitonempty-20180428-6.2.diff)
           27 
           28 Author
           29 ------
           30 * thatlittlegit - <personal@thatlittlegit.tk>