Description

This patch adds "window swallowing" to dwl.

If a user runs a graphical program from the terminal (e.g., mpv), the terminal will be hidden and only a window of the newly spawned graphical program will be visible. The terminal stays hidden until the graphical program is closed. This patch helps users spawning a lot of graphical programs from their command line by avoiding cluttering the screen with many unusable terminals.

foot is the terminal by default, you can change it in client rules in config.h.

In 2025-03-03 v0.7 version, the patch had been rewritten from scratch to make it more robust and add a few more features:

  • "dynamically swallow" windows by pressing Alt+a (a focused window will swallow/unswallow the previously focused one)
  • toggle automatic swallowing by Alt+Shift+a
  • if a window has swallowed another, it get thicker borders

Download

swallow.patch

swallow-freebsd.patch

Apply this patch on top of the swallow.patch if you use FreeBSD.

Authors