sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (2295B)


      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:
     34 ```bash
     35 better-swallow <CMD>
     36 ```
     37 This will cause any windows spawned by the command to replace the parent window.
     38 Since `betterswallow` is quite long, I recommend creating an alias, such as `bs`.
     39 
     40 #### Limitations
     41 
     42 - Due to reliance on the `Xres` extension and PIDs, this will fail if the X server
     43 is not running on the same machine as `betterswallow`, and it may add nonsensical
     44 entries to the "swallow queue".
     45 - If a swallowed process opens a window deeper in the process tree, it will not
     46 be swallowed. This may be fixed in the future by traversing the entire process
     47 chain rather than just one step up. Open an issue if you encounter this.
     48 
     49 Download
     50 --------
     51 * [dwm-betterswallow-20250116-89eeca1.diff](dwm-betterswallow-20250116-89eeca1.diff) (2025-01-16)
     52 
     53 Author
     54 ------
     55 * Hubert Głuchowski - <fishhh@fishhh.dev>