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

Olivier Fourdan fourdan at gmail.com
Wed Oct 19 16:56:26 CEST 2022

Hi Enrico,

On Wed, 19 Oct 2022 at 16:41, Enrico Weigelt, metux IT consult <
lkml at metux.net> wrote:

> 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>
>      <property name="XTerm.xterm.*.*" type="array">
>        <property name="placement.midpoint" type="string" value="2266x540"/>
>      </property>
>      <property name="XEyes.xeyes.*.*" type="array">
>        <property name="force.border"        type="bool"   value="true"/>
>      </property>
>    </property>
>    ...
> </channel>
> The property name is constructed from window class, window class name,
> window name and window type, separated by dot. Asterisks match to any
> value.
> 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:
> https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/55
> If you like it, feel free to leave your thumb up :)

Thanks for your contribution!

However, historically, we've always left that to third party tools rather
than having such mechanisms implemented in the window manager itself. On

That's part o the philosophy of xfce from the beginning, keeps things
simple, bloat free and modular enough that people can achieve whatever (or
at least most of what) they need without having everything implemented in
the window manager. I kinda still like that philosophy.

Also, xfconf is not really designed to implement such complex
configurations, it's meant to store basic preferences. And without a proper
GUI to configure the feature, I'm afraid that would remain mostly unused by
most people.

So to me, that sounds like a feature for a very specific use case of yours,
but not necessarily something that the vast majority of users would require.

Also, worth noting that windows can get restored on their previous location
when using session management, the state and location of windows is saved
on logout and xfwm4 will try its best to restore the previous location when
the session is loaded again.

All that to say, I am not really convinced we need such a complex mechanism
in xfwm4.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20221019/d52c95e7/attachment.html>

More information about the Xfce4-dev mailing list