Bug 420487

Summary: Feature request: lock window geometry
Product: [Plasma] kwin Reporter: Andrew Udvare <audvare>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andrew Udvare 2020-04-24 00:23:16 UTC
SUMMARY

I often want to lock a window so I cannot accidentally move/resize it especially if it has a grabber somewhere besides the title bar such as the bottom right corner. Setting up a rule for this in settings makes the rule basically permanent. It is not easy to add and remove rules as needed, nor is it quick.

I want to be able to enable/disable this quickly, such as in the context menu in the title bar, under More Actions, if there was an option:

Lock size/placement

This would set the window to be not moveable and not resizeable.

PS

I've not done much KDE development especially not with Kwin but I wouldn't mind attempting to put something together for this.

Also, can this be achieved with a Kwin script?
Comment 1 Andrew Udvare 2020-04-24 02:59:06 UTC
To answer my last question, yes. I made a Kwin script to implement this feature.

https://github.com/Tatsh/kwin-lock-window-placement/blob/master/contents/code/main.js
Comment 2 Vlad Zahorodnii 2020-04-24 07:14:10 UTC
> Also, can this be achieved with a Kwin script?
Yes, it can be implemented with a KWin script and that's the whole point. If we (kwin devs) refuse to implement some feature, then one should be able to implement it as an effect or a script.

I'm sorry to say it but we won't implement this feature because it has pretty limited use-cases.