Window rules not applying on startup

Hey all,

I’m using a setup with two screens, each with 10 virtual desktops, and I have a set of window rules set up so that windows for different apps open on specific virtual desktops and screen. The rules themselves seem to work as intended. However, on startup, it seems like it takes some time before the system becomes “aware” of virtual desktops and screens and is just spawning windows on screen 1, desktop 1. That is - unless I move my mouse before the windows start spawning. In that case, the windows will mostly spawn where they’re supposed to.

Does anyone know of a way to trigger the “awareness” of virtual desktops and screens, before the autostart kicks in (other than moving the mouse :smiley:)? Or, alternatively, is it possible to bind a keyboard shortcut to “Apply all window rules” so that I can let them spawn wherever and just avoid manually moving windows later one by one? I tried looking for such a shortcut, but haven’t found anything.

Thank you for any help!

for me that race is kwin applying rules b4 the outputs/vds are fully up. mouse move just wakes that path early.

flip the desktop/screen bits on those rules from Apply Initially to Force. then they keep sticking after the layout finishes.

if u wanna keep Apply Initially:
-System Settings → Autostart → pick the apps → delay them like 10-15s
-or Session → On login → Start with an empty session and launch stuff from a delayed script

after they land wrong:
-qdbus6 org.kde.KWin /KWin reconfigure

that reloads the rule set for me. bind it under Custom Shortcuts if u want a key.

Thanks so much, I really appreciate it. The reconfigure method just doesn’t do anything. Tried it with all rules set to Apply Initially or Remember, but didn’t help. The “Force” method seems to work so I’ll probably stick with that.

Cheers! o/