plasma-manager icon indicating copy to clipboard operation
plasma-manager copied to clipboard

Window Rule for Position, Virtual Desktops & Keep Above Windows

Open haykh opened this issue 5 months ago • 1 comments

I'm probably doing something wrong, but this doesn't seem to work:

window-rules = [
  {
    description = "Picture-in-Picture";
    match = {
      window-class = {
        value = "zen zen";
        type = "substring";
      };
      title = {
        value = "Picture-in-Picture";
        type = "exact";
      };
    };
    apply = {
      position = {
        value = "1511,84";
        apply = "force";
      };
      virtual-desktops = {
        value = "on-all-desktops";
        apply = "initially";
      };
      keep-above-windows = {
        value = true;
        apply = "initially";
      };
    };
  }
];

which produces this:

Image

instead of the expected behavior:

Image

Also is there a way to enforce this?

Image

haykh avatar Jul 31 '25 11:07 haykh

I found luck with this given by ~/.config/kwinrulesrc.

{
  # ...
  apply = {
    desktops = { # Virtual desktops
      value = "\\0"; # All desktops
      apply = "initially";
    };
    above = { # Keep above other windows
      value = true;
      apply = "force";
    };
  };
}

"Ignore requested geometry" seems to correspond to ignoregeometry if that is what you're talking about (or set apply to force?).

conductorpepper avatar Jul 31 '25 19:07 conductorpepper