{
  lib,
  config,
  ...
}: let
  inherit (lib) mkIf mkEnableOption catppuccin;
  cfg = config.horseman.dots.fuzzel;
  username = config.horseman.username;
  colors = config.horseman.catppuccin.colors;
in {
  options = {
    horseman.dots.fuzzel = {
      enable = mkEnableOption "~/.config/fuzzel/fuzzel.ini";
    };
  };

  config = mkIf cfg.enable {
    home-manager.users.${username}.xdg.configFile."fuzzel/fuzzel.ini".text = ''
      [colors]
      background=${catppuccin.toHexNoHash colors.base}dd
      text=${catppuccin.toHexNoHash colors.text}ff
      prompt=${catppuccin.toHexNoHash colors.accent}ff
      placeholder=${catppuccin.toHexNoHash colors.overlay1}ff
      input=${catppuccin.toHexNoHash colors.text}ff
      match=${catppuccin.toHexNoHash colors.accent}ff
      selection=${catppuccin.toHexNoHash colors.surface2}ff
      selection-text=${catppuccin.toHexNoHash colors.text}ff
      selection-match=${catppuccin.toHexNoHash colors.accent}ff
      counter=${catppuccin.toHexNoHash colors.overlay1}ff
      border=${catppuccin.toHexNoHash colors.accent}ff

      [main]
      font=CaskaydiaCoveNerdFont:weight=semilight
      terminal=kitty


      [border]
      width=2
      selection-radius=3
    '';
  };
}
