{ config, pkgs, ... }: { home.file.".config/ghostty/screensaver".text = '' window-padding-x = 0 window-padding-y = 0 window-padding-color = "extend-always" ''; programs.ghostty = { enable = true; package = if pkgs.stdenv.isDarwin then pkgs.ghostty-bin else pkgs.ghostty; enableFishIntegration = true; settings = { confirm-close-surface = false; window-padding-x = 15; window-padding-y = 15; window-padding-balance = true; # --- The Dynamic Hook (Keep this for your script!) --- # This allows your 'switch-theme' script to override the colors below on the fly. # config-file = "theme.conf"; # --- Base16 Color Mapping (The "Starship Logic") --- # We map the Stylix Base16 palette to Ghostty's specific keys. # Background (surface0 in your Starship config) # background = "${config.lib.stylix.colors.withHashtag.base00}"; # # # Foreground (text in your Starship config) # foreground = "${config.lib.stylix.colors.withHashtag.base05}"; # # # Cursor (Using text color or Rosewater/Base06) # cursor-color = "${config.lib.stylix.colors.withHashtag.base05}"; # cursor-text = "${config.lib.stylix.colors.withHashtag.base00}"; # # # Selection (Highlight) # selection-background = "${config.lib.stylix.colors.withHashtag.base02}"; # selection-foreground = "${config.lib.stylix.colors.withHashtag.base05}"; # # # --- The ANSI Palette (0-15) --- # # Mapping Base16 -> ANSI # # This ensures your 'ls', 'grep', and Starship colors align perfectly. # palette = [ # "0=${config.lib.stylix.colors.withHashtag.base00}" # Black # "1=${config.lib.stylix.colors.withHashtag.base08}" # Red # "2=${config.lib.stylix.colors.withHashtag.base0B}" # Green # "3=${config.lib.stylix.colors.withHashtag.base0A}" # Yellow # "4=${config.lib.stylix.colors.withHashtag.base0D}" # Blue # "5=${config.lib.stylix.colors.withHashtag.base0E}" # Purple (Lavender) # "6=${config.lib.stylix.colors.withHashtag.base0C}" # Cyan (Sapphire) # "7=${config.lib.stylix.colors.withHashtag.base05}" # White # # "8=${config.lib.stylix.colors.withHashtag.base03}" # Bright Black # "9=${config.lib.stylix.colors.withHashtag.base08}" # Bright Red # "10=${config.lib.stylix.colors.withHashtag.base0B}" # Bright Green # "11=${config.lib.stylix.colors.withHashtag.base0A}" # Bright Yellow # "12=${config.lib.stylix.colors.withHashtag.base0D}" # Bright Blue # "13=${config.lib.stylix.colors.withHashtag.base0E}" # Bright Purple # "14=${config.lib.stylix.colors.withHashtag.base0C}" # Bright Cyan # "15=${config.lib.stylix.colors.withHashtag.base07}" # Bright White # ]; }; }; }