Feature: window policies (defaults and override per window/clients)

Enrico Weigelt, metux IT consult lkml at metux.net
Wed Oct 19 16:40:47 CEST 2022

Hello folks,

I'd like to announce a new feature for Xfwm4 that I've implemented
recently: window policies.

Rationale: in some cases one wants to override default behavours for
specific clients.

For example, you want some application to always appear at on a specific
position (maybe a separate monitor). Another neat example is enforcing
borders around windows that usually don't have any.

Policies can be configured quite easily via xfconf (xfwm4 channel):

<channel name="xfwm4" version="1.0">
   <property name="policies" type="array">
     <property name="XTerm.xterm.*._NET_WM_WINDOW_TYPE_NORMAL" type="array">
       <property name="placement.geometry" type="string" value="=100x100"/>
     <property name="XTerm.xterm.*.*" type="array">
       <property name="placement.midpoint" type="string" value="2266x540"/>
     <property name="XEyes.xeyes.*.*" type="array">
       <property name="force.border"        type="bool"   value="true"/>

The property name is constructed from window class, window class name,
window name and window type, separated by dot. Asterisks match to any

Currently defined policy attributes:

* placement.geometry: initial window geometry in standard X notation
   (see XParseGeometry())
* placement.midpoint: initial position by window's midpoint
   (format <x-pos> + "x" <y-pos>)
* force.border: enforce the window to always have border

Here's my merge request:

If you like it, feel free to leave your thumb up :)


Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287

More information about the Xfce4-dev mailing list