Changing screen edge barrier value based on if a window is being dragged

Hello everyone!

Rationale
I like to drag windows to resize, so having an edge barrier value > 25px is necessary. But I also dislike having my mouse getting “caught” when just trying to switch between monitors. 25px ends up being not catchy enough for window resizing, but too catchy for general movement sometimes.

So I thought: “Is there an option to have the screen edge barrier change based on whether a window is currently being dragged or not”. Since it’s not a feature for plasma, there are 2 requirements to make it myself.

  1. Be able to detect when a window is being dragged
  2. Change the edge barrier from a command

The problem

From some brief research, requirement 1 seems to be possible through a kwin script. I cant find a solution to requirement 2 though (though if there is a command to do this, let me know and my problem is solved and there’s no need to do the below)

So my next thought was to clone the kwin repo, make it myself and make a pull request. Though I have absolutely no idea what files to even look at first, so if someone familiar with this area of the codebase could point me in the right direction.

Thanks for reading