{...}: let
  global = import ../global-var.nix;
in {
  home-manager.users.${global.username} = {...}: {
    programs.yazi = {
      enable = true;
      keymap = {
        manager.append_keymap = [
          {
            run = "shell --confirm 'ripdrag \"$@\"'";
            on = ["g" "r"];
          }
        ];
      };
      theme = {
        filetype = {
          rules = [
            {
              fg = "#94e2d5";
              mime = "image/*";
            }
            {
              fg = "#f9e2af";
              mime = "video/*";
            }
            {
              fg = "#f9e2af";
              mime = "audio/*";
            }
            {
              fg = "#f5c2e7";
              mime = "application/zip";
            }
            {
              fg = "#f5c2e7";
              mime = "application/gzip";
            }
            {
              fg = "#f5c2e7";
              mime = "application/x-tar";
            }
            {
              fg = "#f5c2e7";
              mime = "application/x-bzip";
            }
            {
              fg = "#f5c2e7";
              mime = "application/x-bzip2";
            }
            {
              fg = "#f5c2e7";
              mime = "application/x-7z-compressed";
            }
            {
              fg = "#f5c2e7";
              mime = "application/x-rar";
            }
            {
              fg = "#cdd6f4";
              name = "*";
            }
            {
              fg = "#89b4fa";
              name = "*/";
            }
          ];
        };
        help = {
          desc = {
            fg = "#9399b2";
          };
          exec = {
            fg = "#94e2d5";
          };
          footer = {
            bg = "#cdd6f4";
            fg = "#45475a";
          };
          hovered = {
            bg = "#585b70";
            bold = true;
          };
          on = {
            fg = "#f5c2e7";
          };
        };
        input = {
          border = {
            fg = "#89b4fa";
          };
          selected = {
            reversed = true;
          };
          title = {
          };
          value = {
          };
        };
        manager = {
          border_style = {
            fg = "#7f849c";
          };
          border_symbol = "│";
          count_copied = {
            bg = "#a6e3a1";
            fg = "#1e1e2e";
          };
          count_cut = {
            bg = "#f38ba8";
            fg = "#1e1e2e";
          };
          count_selected = {
            bg = "#89b4fa";
            fg = "#1e1e2e";
          };
          cwd = {
            fg = "#94e2d5";
          };
          find_keyword = {
            fg = "#f9e2af";
            italic = true;
          };
          find_position = {
            bg = "reset";
            fg = "#f5c2e7";
            italic = true;
          };
          hovered = {
            bg = "#f38ba8";
            fg = "#1e1e2e";
          };
          marker_copied = {
            bg = "#a6e3a1";
            fg = "#a6e3a1";
          };
          marker_cut = {
            bg = "#f38ba8";
            fg = "#f38ba8";
          };
          marker_selected = {
            bg = "#89b4fa";
            fg = "#89b4fa";
          };
          preview_hovered = {
            underline = true;
          };
          syntect_theme = "/home/noah/.config/bat/themes/catppuccin.tmTheme";
          tab_active = {
            bg = "#cdd6f4";
            fg = "#1e1e2e";
          };
          tab_inactive = {
            bg = "#45475a";
            fg = "#cdd6f4";
          };
          tab_width = 1;
        };
        select = {
          active = {
            fg = "#f5c2e7";
          };
          border = {
            fg = "#89b4fa";
          };
          inactive = {
          };
        };
        status = {
          mode_normal = {
            bg = "#89b4fa";
            bold = true;
            fg = "#1e1e2e";
          };
          mode_select = {
            bg = "#a6e3a1";
            bold = true;
            fg = "#1e1e2e";
          };
          mode_unset = {
            bg = "#f2cdcd";
            bold = true;
            fg = "#1e1e2e";
          };
          permissions_r = {
            fg = "#f9e2af";
          };
          permissions_s = {
            fg = "#7f849c";
          };
          permissions_t = {
            fg = "#89b4fa";
          };
          permissions_w = {
            fg = "#f38ba8";
          };
          permissions_x = {
            fg = "#a6e3a1";
          };
          progress_error = {
            bg = "#45475a";
            fg = "#f38ba8";
          };
          progress_label = {
            bold = true;
            fg = "#ffffff";
          };
          progress_normal = {
            bg = "#45475a";
            fg = "#89b4fa";
          };
          separator_close = "";
          separator_open = "";
          separator_style = {
            bg = "#45475a";
            fg = "#45475a";
          };
        };
        tasks = {
          border = {
            fg = "#89b4fa";
          };
          hovered = {
            underline = true;
          };
          title = {
          };
        };
        which = {
          cand = {
            fg = "#94e2d5";
          };
          desc = {
            fg = "#f5c2e7";
          };
          mask = {
            bg = "#313244";
          };
          rest = {
            fg = "#9399b2";
          };
          separator = "  ";
          separator_style = {
            fg = "#585b70";
          };
        };
      };
    };
  };
}
