URI: 
       index.md - sites - public wiki contents of suckless.org
  HTML git clone git://git.suckless.org/sites
   DIR Log
   DIR Files
   DIR Refs
       ---
       index.md (2197B)
       ---
            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 #### Patching
           21 
           22 The patch requires the `Xres` library. Ensure it's included in your build environment.
           23 Unlike `dynamicswallow`, you don’t need to worry about any IPC patches, as this
           24 patch uses a simpler ClientMessage for registering swallowers.
           25 If you have any patches that store geometry parameters in the `Client` struct,
           26 ensure they are copied in the `copyclientpos` function.
           27 
           28 #### Usage
           29 
           30 To have any graphical program swallowed, run it as `better-swallow <CMD>`.
           31 This will cause any windows spawned by the command to replace the parent window.
           32 Since `better-swallow` is quite long, I recommend creating an alias, such as `bs`.
           33 
           34 #### Limitations
           35 
           36 - Due to reliance on the `Xres` extension and PIDs, this will fail if the X server
           37   is not running on the same machine as `betterswallow`, and it may add nonsensical
           38   entries to the "swallow queue".
           39 - If a swallowed process opens a window deeper in the process tree, it will not
           40   be swallowed. This may be fixed in the future by traversing the entire process
           41   chain rather than just one step up. Open an issue if you encounter this.
           42 
           43 Download
           44 --------
           45 * [dwm-betterswallow-20250116-89eeca1.diff](dwm-betterswallow-20250116-89eeca1.diff) (2025-01-16)
           46 * [dwm-betterswallow-6.6.diff](dwm-betterswallow-6.6.diff) (2025-12-22)
           47 
           48 Author
           49 ------
           50 * Hubert Głuchowski - <fishhh@fishhh.dev>