I have a monitor with multiple modes which include “standard” (good for most things) and “movie”. I want to conveniently switch modes when I change programs. Ideally giving keyboard focus to mpv or similar programs would switch the video mode to movie and taking keyboard focus away would switch it to standard.

Is there a way to do this in KDE Wayland? I looked at the “Window Rules” section in the settings but that doesn’t seem to support such things. I googled it and there are some viable answers for X11 (like have a script that detects window focus and does what I want) but xdotool etc don’t run on Wayland.