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 (2294B)
---
1 betterswallow
2 =============
3
4 Description
5 -----------
6 This patch adds "window swallowing" to DWM, similar to some existing patches,
7 but with a unique take on dynamic swallowing.
8 Unlike the existing [dynamicswallow](https://dwm.suckless.org/patches/dynamicswallow/) patch,
9 `betterswallow` uses PID-based swallowing and a non-standard X11 ClientMessage
10 for communication.
11
12 As with `dynamicswallow`, an external tool, `betterswallow`, is required
13 to use this feature. `betterswallow` is a separate tool that does not require
14 this patch but is enhanced by its presence. Without the patch, `betterswallow`
15 defaults to the devour mechanism, which unmaps the parent window itself.
16
17 Development of this patch should happen on the [GitHub repository](https://github.com/afishhh/better-swallow)
18 of `betterswallow`. If you encounter any bugs, feel free to open an issue.
19
20 Currently, only a version for DWM-6.3 exists. If you wish to update the patch to
21 a newer version of DWM, you can open a pull request on the `betterswallow` repository.
22
23 #### Patching
24
25 The patch requires the `Xres` library. Ensure it's included in your build environment.
26 Unlike `dynamicswallow`, you don’t need to worry about any IPC patches, as this
27 patch uses a simpler ClientMessage for registering swallowers.
28 If you have any patches that store geometry parameters in the `Client` struct,
29 ensure they are copied in the `copyclientpos` function.
30
31 #### Usage
32
33 To have any graphical program swallowed, run it as `better-swallow <CMD>`.
34 This will cause any windows spawned by the command to replace the parent window.
35 Since `better-swallow` is quite long, I recommend creating an alias, such as `bs`.
36
37 #### Limitations
38
39 - Due to reliance on the `Xres` extension and PIDs, this will fail if the X server
40 is not running on the same machine as `betterswallow`, and it may add nonsensical
41 entries to the "swallow queue".
42 - If a swallowed process opens a window deeper in the process tree, it will not
43 be swallowed. This may be fixed in the future by traversing the entire process
44 chain rather than just one step up. Open an issue if you encounter this.
45
46 Download
47 --------
48 * [dwm-betterswallow-20250116-89eeca1.diff](dwm-betterswallow-20250116-89eeca1.diff) (2025-01-16)
49
50 Author
51 ------
52 * Hubert Głuchowski - <fishhh@fishhh.dev>