{ flake, workspaceStrings, ... }:
let
  inherit (flake.config.aesthetics.themes) windowManager;
in
{
  window-rules = [
    {
      open-focused = true;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
            is-floating = true;
            is-focused = true;
          };
          appIDs = [
            ".blueman-manager-wrapped"
            "org.gnome.Calculator"
            "com.github.wwmm.easyeffects"
            "emote"
            "mpv"
            "vlc"
            "org.nomacs.ImageLounge"
            "flameshot"
            "^.protonvpn-app-wrapped$"
            "^Picture-in-Picture$"
            "^Discord Popout$"
            "^Enter name of file to save to…$"
            "^File Upload$"
            ".scrcpy-wrapped"
            "^Battle.net$"
          ];
        in
        builtins.map windowMatch appIDs;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
          };
          appIDs = [
            "floop"
            "org.kde.kdenlive"
            "krita"
            "mpv"
            "vlc"
            "Brave-browser"
            "org.kde.okular"
          ];
        in
        builtins.map windowMatch appIDs;
      opacity = 1.0;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
          };
          appIDs = [
            "signal"
            "vesktop"
          ];
        in
        builtins.map windowMatch appIDs;
      open-on-workspace = workspaceStrings.workspace0;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
          };
          appIDs = [
            "code"
            "zeditor"
          ];
        in
        builtins.map windowMatch appIDs;
      open-on-workspace = workspaceStrings.workspace1;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
          };
          appIDs = [
            "steam"
            "org.kde.kdenlive"
          ];
        in
        builtins.map windowMatch appIDs;
      open-on-workspace = workspaceStrings.workspace2;
    }
    {
      matches =
        let
          windowMatch = c: {
            app-id = c;
          };
          appIDs = [
            "feishin"
            ".scrcpy-wrapped"
          ];
        in
        builtins.map windowMatch appIDs;
      open-on-workspace = workspaceStrings.workspace3;
    }
    {
      # opacity = 0.90;
      clip-to-geometry = true;
      focus-ring.enable = false;
      geometry-corner-radius =
        let
          radius = windowManager.rounding + 0.0;
        in
        {
          top-left = radius;
          top-right = radius;
          bottom-left = radius;
          bottom-right = radius;
        };
    }
  ];
}
