index.md (2318B)
1 # betterswallow 2 3 ## Description 4 5 This patch adds "window swallowing" to dwm, as a few existing patches already do, 6 but with another take on dynamic swallowing. In contrast to the existing 7 [dynamicswallow](https://dwm.suckless.org/patches/dynamicswallow/) patch, 8 `betterswallow` uses PID-based swallowing and a non-standard X11 ClientMessage 9 for communication. As with `dynamicswallow`, an external tool `better-swallow` 10 is required to use it. `better-swallow` is a separate tool that does not 11 *require* this patch but is only enhanced by its presence, without the patch 12 it falls back to the devour mechanism of unmapping the parent window itself. 13 14 Development of this patch should only happen on the 15 [GitHub repository](https://github.com/afishhh/better-swallow) of 16 `better-swallow`, if you find any bugs feel free to open an issue. 17 18 Currently only a version for dwm-6.3 exists, if you wish to update the patch to 19 a newer version of DWM you can open a pull request to the `better-swallow` 20 repository. 21 22 ## Download 23 24 - [dwm-betterswallow-20241215-6.3.diff](dwm-betterswallow-20241215-6.3.diff) 25 - [better-swallow](https://github.com/afishhh/better-swallow) 26 27 ## Patching 28 29 The patch requires the `Xres` library, make sure you have it in your build environment. 30 31 Unlike `dynamicswallow` you don't have to worry about any IPC patches, because 32 this patch uses the simpler method of a ClientMessage for registering swallowers. 33 34 If you have any patches that store geometry parameters in the `Client` struct, 35 make sure they're copied in the `copyclientpos` function. 36 37 ## Usage 38 39 Run any graphical program you want to be swallowed as 40 `better-swallow <CMD>`, this will cause any windows it spawns to replace the 41 parent window. 42 43 Since `better-swallow` is a pretty long name I recommend creating an alias such as 44 `bs`. 45 46 ## Limitations 47 48 - Due to the reliance on the `Xres` extension and PIDs, this will fail if the X server 49 is not running on the same machine as `better-swallow` and possibly add nonsensical 50 entries to the "swallow queue". 51 - If a swallowed process opens the window deeper in the process tree it will not get 52 swallowed. This may be fixed in the future by traversing the whole process chain 53 instead of just one step up. Open an issue if you actually encounter this. 54 55 ## Author 56 - Hubert GÅ‚uchowski (<fishhh@fishhh.dev>)