{ pkgs, hyprlandSettings, ... }:
let
  settings = import ../../settings.nix { inherit pkgs; };
in
{
  programs.kitty = {
    enable = true;
    shellIntegration.enableZshIntegration = true;

    font = {
      name = settings.fontName;
      package = settings.fontPackage;
      size = settings.fontSize;
    };

    settings = {
      bold_font = "auto";
      italic_font = "auto";
      bold_italic_font = "auto";
      mouse_hide_wait = "2.0";
      cursor_shape = "block";
      url_style = "dotted";
      confirm_os_window_close = "0";
      background_opacity = "0.85";

      # The basic colors
      foreground            = settings.nord.snowStorm.nord6;
      background            = settings.nord.polarNight.nord0;
      selection_foreground  = settings.nord.polarNight.nord0;
      selection_background  = settings.nord.aurora.nord15;

      # Cursor colors
      cursor                  = settings.nord.aurora.nord15;
      cursor_text_color       = settings.nord.polarNight.nord0;

      # URL underline color when hovering with mouse
      url_color = settings.nord.aurora.nord15;

      # Kitty window border colors
      active_border_color   = settings.nord.frost.nord10;
      inactive_border_color = settings.nord.polarNight.nord1;
      bell_border_color     = settings.nord.aurora.nord13;

      # OS Window titlebar colors
      wayland_titlebar_color  = settings.nord.polarNight.nord0;
      macos_titlebar_color    = settings.nord.polarNight.nord0;

      # Tab bar colors
      active_tab_foreground   = settings.nord.polarNight.nord3;
      active_tab_background   = settings.nord.aurora.nord15;
      inactive_tab_foreground = settings.nord.snowStorm.nord6;
      inactive_tab_background = settings.nord.polarNight.nord1;
      tab_bar_background      = settings.nord.polarNight.nord3;

      # Colors for marks (marked text in the terminal)
      mark1_foreground = settings.nord.polarNight.nord0;
      mark1_background = settings.nord.frost.nord10;
      mark2_foreground = settings.nord.polarNight.nord0;
      mark2_background = settings.nord.aurora.nord15;
      mark3_foreground = settings.nord.polarNight.nord0;
      mark3_background = settings.nord.frost.nord8;

      # The 16 terminal colors

      # black
      color0 = settings.nord.polarNight.nord0;

      # Autosuggestion
      color8 = settings.nord.frost.nord10;

      # red
      color1 = settings.nord.aurora.nord11;
      color9 = settings.nord.aurora.nord11;

      # green
      color2 = settings.nord.aurora.nord14;
      color10 = settings.nord.aurora.nord14;

      # yellow
      color3 = settings.nord.aurora.nord13;
      color11 = settings.nord.aurora.nord13;

      # blue
      color4  = settings.nord.frost.nord10;
      color12 = settings.nord.frost.nord10;

      # magenta
      color5  = settings.nord.aurora.nord15;
      color13 = settings.nord.aurora.nord15;

      # cyan
      color6 = settings.nord.frost.nord8;
      color14 = settings.nord.frost.nord8;

      # white
      color7  = settings.nord.snowStorm.nord5;
      color15 = settings.nord.snowStorm.nord4;
    };
  };
}
