{pkgs, config, lib, ...}: {
  programs.rofi = {
    enable = true;
    package = pkgs.rofi-wayland;

    theme = let 
      inherit (config.lib.formats.rasi) mkLiteral;
    in lib.mkForce {
      "*" = with config.lib.stylix.colors; {
        bg0 = mkLiteral "#${base00}";
        bg1 = mkLiteral "#${base01}";
        bg2 = mkLiteral "#${base02}";
        bg3 = mkLiteral "#${base03}";
        fg0 = mkLiteral "#${base08}";
        fg1 = mkLiteral "#${base09}";
        fg2 = mkLiteral "#${base0A}";
        fg3 = mkLiteral "#${base0B}";

      # font = config.stylix.fonts.sansSerif.name;

        background-color = mkLiteral "transparent";
        text-color = mkLiteral "@fg0";

        margin = mkLiteral "0px";
        padding = mkLiteral "0px";
        spacing = mkLiteral "0px";
      };

      window = {
        location = mkLiteral "center";
        width = mkLiteral "33%";
        height = mkLiteral "33%";
        border-radius = mkLiteral "24px";
    
        background-color = mkLiteral "@bg0";
      };

      mainbox = {
        padding = mkLiteral "12px";
      };

      inputbar = {
        background-color = mkLiteral "@bg1";
        border-color = mkLiteral "@bg3";

        border = mkLiteral "2px";
        border-radius = mkLiteral "16px";

        padding = mkLiteral "8px 16px";
        spacing = mkLiteral "8px";
        children = map mkLiteral[ "prompt" "entry" ];
      };

      prompt = {
        text-color = mkLiteral "@fg2";
      };

      entry = {
        placeholder = "Search";
        placeholder-color = mkLiteral "@fg3";
      };

      message = {
        margin = mkLiteral "12px 0 0";
        border-radius = mkLiteral "16px";
        border-color = mkLiteral "@bg2";
        background-color = mkLiteral "@bg2";
      };

      textbox = {
        padding = mkLiteral "8px 24px";
      };

      listview = {
        background-color = mkLiteral "transparent";

        margin = mkLiteral "12px 0 0";
        lines = mkLiteral "8";
        columns = mkLiteral "1";

        fixed-height = mkLiteral "false";
      };

      element = {
        padding = mkLiteral "8px 16px";
        spacing = mkLiteral "8px";
        border-radius = mkLiteral "16px";
      };

      "element normal active" = {
        text-color = mkLiteral "@bg3";
      };

      "element selected normal" = {
        background-color = mkLiteral "@bg3";
        text-color = mkLiteral "@bg1";
      };

      "element selected active" = {
        background-color = mkLiteral "@bg3";
        text-color = mkLiteral "@bg1";
      };

      "element-icon" = {
        size = mkLiteral "1em";
        vertical-align = mkLiteral "0.5";
      };

      "element-text" = {
        text-color = mkLiteral "inherit";
      };
    };
  };
}
