Bug 420487 - Feature request: lock window geometry
Summary: Feature request: lock window geometry
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-24 00:23 UTC by Andrew Udvare
Modified: 2020-04-24 07:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.