{
  rice,
  pkgs,
  ...
}:
let
  pal = rice.palette.hex;
in
{
  programs.wlogout = {
    enable = true;
    package = pkgs.wleave;
    layout = builtins.fromJSON (builtins.readFile ../dots/wlogout/layout);
    style =
      with pal;
      (builtins.replaceStrings
        [
          "/usr/share/wlogout"
          "/etc/wlogout"
          "#WINBG"
          "#BTNCOL"
          "#BTNBG"
          "#BTNFOCUSBG"
          "#WINLOGO"
        ]
        [
          "${pkgs.wlogout}/share/wlogout"
          "${pkgs.wlogout}/etc/wlogout"
          util.bg
          bright.yellow
          util.bg
          normal.black
          (builtins.path {
            name = "winlogo";
            path = ../icons/winlogo.png;
            sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108";
          })
        ]
        (builtins.readFile ../dots/wlogout/style.css)
      );
  };
  # xdg.configFile = {
  #   "wleave/layout".text = builtins.readFile ../dots/wlogout/layout;
  #   "wleave/style.css".text = with palette-hex; (builtins.replaceStrings
  #     [
  #       "/usr/share/wlogout"
  #       "/etc/wlogout"
  #       "#WINBG"
  #       "#BTNCOL"
  #       "#BTNBG"
  #       "#BTNFOCUSBG"
  #       "#WINLOGO"
  #     ]
  #     [
  #       "${pkgs.wleave}/share/wleave"
  #       "${pkgs.wleave}/etc/wleave"
  #       util.bg
  #       bright.yellow
  #       util.bg
  #       normal.black
  #       (builtins.path {
  #         name = "winlogo";
  #         path = ../icons/winlogo.png;
  #         sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108";
  #       })
  #     ]
  #     (builtins.readFile ../dots/wlogout/style.css));
  # };

  home.packages = [ pkgs.wlogout ];
}
