{ config, ... }:
{
  services.kanshi = {
    enable = config.home.desktop.enable;
    settings = [
      {
        output = {
          criteria = config.displays.tower1;
          mode = "1920x1080@143.979996Hz";
        };
      }
      {
        output = {
          criteria = config.displays.jupiter;
          mode = "800x1280@59.99900";
          transform = "270";
          scale = 1.15;
        };
      }
      {
        profile = {
          name = "primary";
          outputs = [
            {
              criteria = config.displays.tower1;
              position = "3840,405";
            }
            {
              criteria = config.displays.tower2;
              position = "1920,405";
            }
            {
              criteria = config.displays.tower3;
              position = "5760,0";
              transform = "90";
            }
            {
              criteria = config.displays.tower4;
              position = "0,405";
            }
          ];
        };
      }
      {
        profile = {
          name = "estradiol";
          outputs = [
            {
              criteria = config.displays.estradiol1;
              position = "0,0";
            }
            {
              criteria = config.displays.estradiol2;
              position = "1920,0";
              scale = 0.85;
            }
            {
              criteria = "eDP-1";
              status = "disable";
            }
          ];
        };
      }
      {
        profile = {
          name = "docked";
          outputs = [
            {
              criteria = "*";
              status = "enable";
            }
            {
              criteria = "eDP-1";
              status = "disable";
            }
          ];
        };
      }
      {
        profile = {
          name = "undocked";
          outputs = [
            {
              criteria = "eDP-1";
              status = "enable";
            }
          ];
        };
      }
    ];
  };
}
