<div dir="ltr"><div dir="ltr">Hi Enrico,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 19 Oct 2022 at 16:41, Enrico Weigelt, metux IT consult <<a href="mailto:lkml@metux.net">lkml@metux.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello folks,<br>
<br>
<br>
I'd like to announce a new feature for Xfwm4 that I've implemented<br>
recently: window policies.<br>
<br>
Rationale: in some cases one wants to override default behavours for<br>
specific clients.<br>
<br>
For example, you want some application to always appear at on a specific<br>
position (maybe a separate monitor). Another neat example is enforcing<br>
borders around windows that usually don't have any.<br>
<br>
Policies can be configured quite easily via xfconf (xfwm4 channel):<br>
<br>
<br>
<channel name="xfwm4" version="1.0"><br>
   ...<br>
   <property name="policies" type="array"><br>
     <property name="XTerm.xterm.*._NET_WM_WINDOW_TYPE_NORMAL" type="array"><br>
       <property name="placement.geometry" type="string" value="=100x100"/><br>
     </property><br>
     <property name="XTerm.xterm.*.*" type="array"><br>
       <property name="placement.midpoint" type="string" value="2266x540"/><br>
     </property><br>
     <property name="XEyes.xeyes.*.*" type="array"><br>
       <property name="force.border"        type="bool"   value="true"/><br>
     </property><br>
   </property><br>
   ...<br>
</channel><br>
<br>
The property name is constructed from window class, window class name,<br>
window name and window type, separated by dot. Asterisks match to any<br>
value.<br>
<br>
Currently defined policy attributes:<br>
<br>
* placement.geometry: initial window geometry in standard X notation<br>
   (see XParseGeometry())<br>
* placement.midpoint: initial position by window's midpoint<br>
   (format <x-pos> + "x" <y-pos>)<br>
* force.border: enforce the window to always have border<br>
<br>
<br>
Here's my merge request:<br>
<a href="https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/55" rel="noreferrer" target="_blank">https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/55</a><br>
<br>
If you like it, feel free to leave your thumb up :)<br></blockquote><div><br></div><div>Thanks for your contribution!</div><div><br></div><div>However, historically, we've always left that to third party tools rather than having such mechanisms implemented in the window manager itself. On purpose.<br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.<br></div><div><br></div><div>All that to say, I am not really convinced we need such a complex mechanism in xfwm4.</div><div><br></div><div>Cheers</div><div>Olivier</div></div></div>