{ lib, pkgs, config, ... }: {
  config = lib.mkIf (config.usercfg.wm == "Wayland") {

    home.packages = with pkgs; [ swayidle swaylock-effects ];

    xdg.configFile."swaylock/config".text = ''
      screenshots
      grace-no-mouse
      grace-no-touch
      grace=5
      effect-pixelate=5
      fade-in=0.2

      ignore-empty-password
      font=IBM Plex Mono

      color=${config.colorScheme.palette.base00}00

      indicator-radius=100
      indicator-thickness=30

      separator-color=${config.colorScheme.palette.base00}00

      inside-color=${config.colorScheme.palette.base0C}00
      inside-clear-color=${config.colorScheme.palette.base08}FF
      inside-caps-lock-color=${config.colorScheme.palette.base09}00
      inside-ver-color=${config.colorScheme.palette.base0C}FF
      inside-wrong-color=${config.colorScheme.palette.base0F}FF


      ring-color=${config.colorScheme.palette.base00}00
      ring-clear-color=${config.colorScheme.palette.base00}00
      ring-caps-lock-color=${config.colorScheme.palette.base00}00
      ring-ver-color=${config.colorScheme.palette.base00}00
      ring-wrong-color=${config.colorScheme.palette.base00}00

      line-color=${config.colorScheme.palette.base00}00
      line-clear-color=${config.colorScheme.palette.base00}00
      line-caps-lock-color=${config.colorScheme.palette.base00}00
      line-ver-color=${config.colorScheme.palette.base00}00
      line-wrong-color=${config.colorScheme.palette.base00}00

      text-color=${config.colorScheme.palette.base00}00
      text-clear-color=${config.colorScheme.palette.base00}00
      text-caps-lock-color=${config.colorScheme.palette.base00}00
      text-ver-color=${config.colorScheme.palette.base00}00
      text-wrong-color=${config.colorScheme.palette.base00}00


      key-hl-color=${config.colorScheme.palette.base0C}FF
      bs-hl-color=${config.colorScheme.palette.base08}FF
      caps-lock-key-hl-color=${config.colorScheme.palette.base09}FF
      caps-lock-bs-hl-color=${config.colorScheme.palette.base09}FF
    '';
  };
}
