Hi my first post on Lemmy, so I felt like making it (hopefully) useful one lol.

So I have had this issue when gaming on Linux for a while, where the mouse keeps escaping the screen when playing fast paced games like Quake or Splitgate. This is because I have multi monitor setup.

I found this script that keeps the mouse inside coordinates you give to it. Maybe this will help someone else with same issue!

Here’s direct link to the script I found (I didn’t write the script, just saved it on Gist for safekeeping): https://gist.github.com/Akselmo/d4f35798a222b9af5d0c0f1b4021d11d

Hope it helps anyone! And if someone has KWin scripts or something like that which do same thing, or some even better solutions, do share! I know about the one where you move the other monitor below or slightly off the first monitor, but that hinders my normal use of it, and I don’t like moving monitors every time I play.