Files
dwl-patches/patches/blur
2026-09-28 21:47:38 +02:00
..
2026-09-28 21:47:38 +02:00
2026-09-28 21:47:38 +02:00
2026-09-28 21:47:38 +02:00

Description

Blur implemented using scenefx

Implemented keybinds:

  • dynamically toggle blur globally:
	{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_B,           toggleblur,       {0} },
  • toggle blur for focused window:
	{ MODKEY|WLR_MODIFIER_CTRL,  XKB_KEY_b,           toggleblurfocused,{0} },

Options in config.def.h:

#define blur_params 2, 2, 0, 0.703125, 0.4375, 0.875 // passes, radius, noise, brightness, contrast, saturation
static int blur_enabled = 1;

Requires scenefx version 0.5 (which is currently the latest version). Some information about installation instructions is provided at the bottom.

I have only implemented the xray version of blur, where blur skips past contents of other windows underneath a window and directly shows the background, because this way the background blur is cached, which helps to significantly reduce the gpu usage.

Tested blur.patch on main branch commit dwl/dwl@f1675a4800

As of commit fd5e06a50d the bar patch does not apply cleanly to dwl/dwl@f1675a4800, therefore the blur_bar.patch would also need to be manually applied. I will update it after the bar patch gets updated.

Download

  • blur.patch : for application to base dwl, does not apply blur to the bar

  • blur_bar.patch : for use with the bar patch, this version applies blur to the bar too, but to actually see the blur effect the bar background color would need to be changed to a transparent or translucent value, for example:

static uint32_t colors[][3]                = {
	/*               fg          bg          border    */
	[SchemeNorm] = { 0x777777ff, 0x00000000, 0x00000000 },
	[SchemeSel]  = { 0x00ffffff, 0x00000000, 0x00ffffff },
	[SchemeUrg]  = { 0xff00ffff, 0x00000000, 0xff00ffff },
};

Authors


Installing scenefx version 0.5

The recommended way to install scenefx is through your linux distro's package manager, if the scenefx version in your distro's official repositories is 0.5. The scenefx github page has a list with the version info on some common distros. For vanilla Arch Linux users, scenefx is not available in the official repositories, but it can be installed via the AUR instead, either using yay or paru or some other AUR helper, or manually by following the steps listed on the Arch wiki for AUR. Some derivative Arch distros like CachyOS provide scenefx through their official repositories.

If you install scenefx via your package manager or through AUR, no further steps are needed. But if you compile from source using the instructions provided in the scenefx github repository, depending on where you install scenefx, you might need to ensure that the PKG_CONFIG specified in dwl's config.mk is able to locate the header files for scenefx. By default, it uses pkg-config, so to check, use the following terminal command:

pkg-config --cflags scenefx-0.5

If this returns a path to the scenefx header files, no further steps are needed. Otherwise the path to the header files needs to be manually provided following these steps:

  1. Apply the blur patch
  2. In Makefile in the dwl source code, remove scenefx-0.5 from PKGS =
  3. In Makefile add -I/path/to/scenefx_headers with the correct path to DWLCFLAGS = such that it is placed before all other options, so it should look something like this:
DWLCFLAGS = -I/path/to/scenefx_headers `$(PKG_CONFIG) --cflags $(PKGS)` $(WLR_INCS) $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CFLAGS)
  1. In Makefile add -lscenefx-0.5 to LDLIBS = such that it is placed before all other options, so it should look something like this:
LDLIBS    = -lscenefx-0.5 `$(PKG_CONFIG) --libs $(PKGS)` $(WLR_LIBS) -lm $(LIBS)