Re: Saving window positions per monitor config

Vlad Zahorodnii <[email protected]> Tue, 8 Feb 2022 00:29:48 +0200
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
On 2/8/22 00:08, Joshua J. Kugler wrote:
> So, it's 2022, and we're on Plasma 5.
> 
> Is there any way to save window layouts per monitor configuration? It gets
> really old having to move my windows to usable locations every time I unplug
> or plug in my monitors.
> 
> Any ideas?

Hi,

As far as I know, plasma provides no such a feature. Implementing it can 
be tricky because how should the window manager know when a window must 
be moved to another monitor so it doesn't interfere with the user (the 
ultimate source of the truth)?

Regardless of that, kwin provides a scripting api. Such a feature can be 
built on top of that. There's some scripting api documentation on the 
internet, the real world scripts (e.g. kwin-tiling, bismuth, etc) can 
also act as good examples how to write a kwin script.

If kwin scripting misses api needed to implement such a feature, please 
create a bug report (or even better send a patch :-) )

Regards,
Vlad