{ lib, nixosConfig, ... }:
let
  cfg = nixosConfig.my.desktop;
in
{
  wayland.windowManager.hyprland = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
    settings = {
      monitor = [
        ",preferred,auto,1"
      ];
      source = [ "monitors.conf" ];
      # monitorv2 = [
      #   {
      #     output = "desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS FO32U2 0x01010101";
      #     mode = "3840x2160@240.0";
      #     position = "0x0";
      #     scale = 1.5;
      #     bitdepth = 10;
      #     vrr = 3;
      #     supports_wide_color = 1;
      #     supports_hdr = 1;
      #     sdr_min_luminance = 0.000;
      #     sdr_max_luminance = 1000;
      #     min_luminance = 0.000;
      #     max_luminance = 1000;
      #     max_avg_luminance = 400;
      #     cm = "hdr";
      #   }
      #   {
      #     output = "desc:Samsung Electric Company LF32TU87 HNTT700129";
      #     mode = "3840x2160@60.0";
      #     position = "-2560x0";
      #     scale = 1.5;
      #     bitdepth = 10;
      #   }
      #   {
      #     output = "desc:Technical Concepts Ltd Beyond TV 0x00010000";
      #     disabled = true;
      #   }
      # ];
    };
  };
}

# monitorv2 {
#   output = desc:Technical Concepts Ltd Beyond TV 0x00010000
#   mode = 3840x2160@120.00
#   position = 2560x270
#   scale = 1.5
#   bitdepth = 10
#   vrr = 1
#   supports_wide_color = 1
#   supports_hdr = 1
#   sdr_min_luminance = 0.0005
#   sdr_max_luminance = 2000
#   min_luminance = 0.0005
#   max_luminance = 2000
#   max_avg_luminance = 400
#   cm = hdr
# }

# workspace = 21, monitor:desc:Technical Concepts Ltd Beyond TV 0x00010000, default:true

# windowrule = match:class $games, workspace 21, fullscreen on
# # windowrule = fullscreen, class:$games
# windowrule = match:class steam, match:title (Steam Big Picture Mode), workspace 21