# Kitty — Nomarchy's only terminal, themed from theme-state.json. # Colors, fonts and the full 16-color ANSI palette are baked from the # JSON at eval time (same contract Ghostty used to have). Always # installed: SUPER+Return, SUPER+E, doctor, calendar, and $TERMINAL # all depend on it. { config, lib, ... }: let t = config.nomarchy.theme; c = t.colors; colorSettings = lib.listToAttrs ( lib.imap0 (i: color: { name = "color${toString i}"; value = color; }) t.ansi ); in { # Kitty is ALWAYS installed. `nomarchy.kitty.enable` gates only whether # Nomarchy's theming/config is applied — a user can keep kitty but drop # our config; they cannot remove kitty itself without breaking the # desktop's load-bearing classed windows. programs.kitty = { enable = true; shellIntegration.enableBashIntegration = true; shellIntegration.enableZshIntegration = true; font = lib.mkIf config.nomarchy.kitty.enable { name = t.fonts.mono; size = t.fonts.size; }; settings = lib.mkIf config.nomarchy.kitty.enable ({ background = c.base; foreground = c.text; cursor = c.accent; cursor_text_color = c.base; selection_background = c.overlay; selection_foreground = c.text; url_color = c.accent; active_border_color = c.accent; inactive_border_color = c.surface; background_opacity = t.ui.terminalOpacity; window_padding_width = lib.mkDefault 12; confirm_os_window_close = lib.mkDefault 0; enable_audio_bell = lib.mkDefault false; wayland_titlebar_color = lib.mkDefault "background"; # Fresh windows for doctor/calendar --class launches (not one shared instance). single_instance = lib.mkDefault false; } // colorSettings); }; }