{
  config,
  lib,
  username,
  ...
}:

let
  cfg = config.shell.components.kitty;
in
{
  options.shell.components.kitty = {
    enable = lib.mkEnableOption (lib.mdDoc "Enable pre-configured kitty");
  };

  config = lib.mkIf cfg.enable {
    home-manager.users.${username} = {
      wayland.windowManager.hyprland.settings.bind = [
        "SUPER,T,exec,uwsm app -- kitty"
      ];
      programs.kitty = {
        enable = true;
        shellIntegration.enableZshIntegration = true;
        extraConfig = ''
          symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono

          font_size 12.75
        '';
        settings = {
          window_padding_width = 10;
          text_composition_strategy = "1.0 0";
        };
      };
    };
  };
}
