Adding variable tiling width ratio and gaps to XFCE xfwm4

       394 words, 2 minutes

After a lot of desktop environment and window manager hoping, I’ve settle down with XFCE. I find it customizable, pretty and fast. But after all my hoping, I’ve always missed a couple of things learned from the tiling window manager world: resizable master area and gaps.

Here a couple of patches I wrote to enable those two features for Xfwm4.

For a long time, I’ve used xdotools to tile the windows width ratio and insert gaps. The script was called using keystrokes. But I couldn’t find a way to use the “snap” feature of XFCE. Patching the sources provides the usage of mouse to manage the windows.

Because XFCE is available as version 4.16 on OpenBSD 7.2-STABLE, I started patching that particular Xfwm4 version. In OpenBSD 7.2-CURRENT, XFCE 4.18 was made available. Patches for both version are available here.

The 4.18 patches have been submitted to the XFCE project . Hopefully, they will make their way to the upstream code.

Here what the applied patches look like from the user perspective.

Patches for Xfwm4 4.16 can be downloaded here .

Patches for Xfwm4 4.18 can be downloaded here .

As I built them on OpenBSD, patches are expected to be installed in /usr/ports/x11/xfce4/xfwm4/patches. But they can probably be applied straight away from Xfwm4 source directory if you’re using another OS.

Those patches will expose 3 new variables in the xfce4-settings-editor application. In the xfwm4 section, you’ll find tile_ratio, gaps_inner and gaps_outer.

Hope it helps. See you on r/unixporn :D