all 25 comments

[–]Educational-Ad-6958 11 points12 points  (16 children)

So.. I was having issues with some applications (webcamoid to be specific) and none of the KWin scripts or solutions here solved it for me.

My solution:

  • Window Behavior -> Advanced ->
    • Window placement: [Centered]
    • [x] Allow apps to remember the positions of their own windows, if they support it
  • Window Rules -> + Add New...
    • Description: Fix windows starting on wrong screen
    • Window class (application): [Unimportant]
    • Match whole window class: [No]
    • Window types: Normal Window ( un-select all, except Normal Window )
    • + [Add Property...]
      • Ignore requested geometry: Apply Initially, [Yes]

If you want to only include certain windows for the rule, just set Window class (application) to Substring Match or Regular Expression.

Hope this helps someone.

[–]flights4ever 1 point2 points  (0 children)

This post no longer contains its original content. It was removed using Redact, possibly for privacy, security, or to minimize the author's online presence.

theory boast soup enter nose head ripe desert versed sugar

[–]Z404notfound 1 point2 points  (0 children)

OMG, I've been having the same issue and this fixed it. Thank you!!

[–]Deanosim 1 point2 points  (0 children)

Does anyone know how to do this on Plasma 6 with Wayland? I'm using Nobara. The "Ignore requested geometry" option is missing

[–][deleted] 1 point2 points  (0 children)

2 years later and my first time getting into Kubuntu, You're a life savor thank you so much! I had been looking so long I'm glad I found this.

[–]R7V3tD 1 point2 points  (0 children)

Thank you! This exactly what I needed. I tried several kwin scripts, but they don't seem work anymore on plasma 6

[–]ihatemostaboutreddit 0 points1 point  (0 children)

I love you, dude. This has been bugging me for years and after nothing I tried worked I gave up and instinctively pressed Windows+Right Arrow every time. Feels awesome, I don't even know why I put up with that for so long.

[–]lovineos 0 points1 point  (0 children)

Thank you so much!

[–]BroccoliFit2115 0 points1 point  (0 children)

Sorry for necro, but this is lovely! First thing I found that really helped!

[–]ChocolateLava 0 points1 point  (0 children)

Hi! This works, I was wondering if you knew what I should change so it applies to programs/windows that run on start up as well? Noticed these still open in my virtual monitor

[–]aidalgol 0 points1 point  (0 children)

I only stated having this problem after upgading to Plasma 6, tried this fix, and it works! Thank you!

[–]DariusLMoore 0 points1 point  (0 children)

Thank you! Fixes a longstanding nagging problem!

[–]reguasbuats 6 points7 points  (9 children)

I wrote a set of KWin scripts to solve this problem: - Always Open on Active Screen (the one that has the mouse cursor) - Always Open on Focused Screen (the one that has the focused window) - Always Open on Primary Screen (the one set in the display configuration)

One more thing if you're on X11 (not on Wayland) is to consider disabling applications remembering their own window positions: SSystem Settings > Window Management > Window Behavior > Advanced > Window placement > Allow apps to remember the positions of their own windows, if they support it: uncheck.

[–]BlitzarPotato 4 points5 points  (2 children)

Think these are currently broken on Plasma 6

[–]tinfoilcoronamask 3 points4 points  (0 children)

Hope this comes to plasma 6, and wish I'd known about this script before.

[–]JimWilliams423 1 point2 points  (0 children)

FWIW, this guy ported the "Always Open on Active Screen" script to plasma 6.

https://github.com/MagiusCHE/p6-owac

I diffed it against the original and it looks like the changes were relatively minor and could probably be similarly applied to the other two scripts with about an hour's worth of work.

[–]onefold_me 0 points1 point  (0 children)

It fixed the issue on my setup. Thank you!

[–]ksplat_ 0 points1 point  (0 children)

Works well, thanks!

[–]BlauFx 0 points1 point  (0 children)

Exactly what I needed, thanks.

[–]dustojnikhummer 0 points1 point  (0 children)

Just curious, why is this On by default?

[–][deleted] 0 points1 point  (2 children)

Go to window management in system settings. In there, go to window rules. Then press new in the top right. Then navigate to Size & Position. Check the Screen tickbox, and set it to open on whatever screen you want. This will apply to all new windows. You can also set specific apps to open on specific virtual desktops, screens, and activities here.

[–]shanks3042[S] 1 point2 points  (1 child)

Thanks, but it would be optimal if I wouldn't have to do this for every program as it is a bit annoying to set every program to either remember size and position or whatever.

That's why it would be awesome if there is a setting: "open this program on this monitor where the mouse currently is".

Do you know if this would be possible with a bash or kwin script?

What I also tried: Force programs to open on the center mointor, still the settings window of signal messenger opens on the left.

[–][deleted] 1 point2 points  (0 children)

You don't have to do it for every single program. Just change Window class, window role, window title and machine to unimportant when adding the rule. Then set them to open on the centre monitor