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

{
    programs.kitty = {
        enable = true;
        shellIntegration.enableZshIntegration = true;
        font = {
            name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
            size = lib.mkDefault 14;

        };
        keybindings = {
            "kitty_mod+h" = "kitty_scrollback_nvim";
            "kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
            "kitty_mod+enter" = "nop";
        };
        settings = {
            cursor_shape = "block";
            cursor_beam_thickness = 1;
            scrollback_lines = 100000;
            scrollback_fill_enlarged_window = "yes";
            enable_audio_bell = "no";
            confirm_os_window_close = 0;
            modify_font = "cell_height 115%";
            allow_remote_control = "socket-only";
            listen_on = "unix:/tmp/kitty";
            shell_integration = "enabled";
            action_alias = "kitty_scrollback_nvim kitten /home/user/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
            mouse_map = "ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output";

            # Theme
            background = "#000010";
            foreground = "#F8F8F2";
            cursor = "#bbbbbb";
            selection_background = "#b4d5ff";
            color0 = "#121212";
            color8 = "#545454";
            color1 = "#fa2573";
            color9 = "#f5669c";
            color2 = "#97e123";
            color10 = "#b0e05e";
            color3 = "#dfd460";
            color11 = "#fef26c";
            color4 = "#0f7fcf";
            color12 = "#00afff";
            color5 = "#8700ff";
            color13 = "#af87ff";
            color6 = "#42a7cf";
            color14 = "#50cdfe";
            color7 = "#bbbbbb";
            color15 = "#ffffff";
            selection_foreground = "#121212";
            background_opacity = "0.3";
        };
    };
}