{ config, pkgs, lib, ... }:

{
  programs.alacritty = {
    enable = lib.mkDefault true;
    settings = lib.mkDefault {
      env = {
        TERM = "xterm-256color";
      };
      terminal = {
        osc52 = "CopyPaste";
      };
      window = {
        padding = { x = 14; y = 14; };
        decorations = "None";
      };
      keyboard = {
        bindings = [
          { key = "Insert"; mods = "Shift"; action = "Paste"; }
          { key = "Insert"; mods = "Control"; action = "Copy"; }
          { key = "Return"; mods = "Shift"; chars = "\\u001B\\r"; }
        ];
      };
    };
  };
}
