diff options
Diffstat (limited to 'home/apps/alacritty.nix')
-rw-r--r-- | home/apps/alacritty.nix | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/home/apps/alacritty.nix b/home/apps/alacritty.nix new file mode 100644 index 0000000..5c47f65 --- /dev/null +++ b/home/apps/alacritty.nix @@ -0,0 +1,97 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.alacritty; +in { + config = mkIf cfg.enable { + default.terminal = lib.mkDefault "alacritty"; + + programs.alacritty = { + enable = true; + + settings = { + # Font + font = { + size = 11; + bold = { + style = "Bold"; + }; + bold_italic = { + style = "Bold Italic"; + }; + italic = { + style = "Italic"; + }; + normal = { + family = config.theme.font.monospace; + style = "Regular"; + }; + offset = { + x = 0; + y = 0; + }; + }; + + # Window + window = { + decorations = "full"; + dynamic_title = true; + padding = { + x = config.theme.outerGap; + y = config.theme.outerGap; + }; + opacity = config.theme.opacity; + }; + + # Colors + colors = { + normal = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit + (config.theme.colors.normal) + black + red + green + yellow + blue + magenta + cyan + white + ; + }; + + bright = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit + (config.theme.colors.bright) + black + red + green + yellow + blue + magenta + cyan + white + ; + }; + + cursor = { + background = "CellForeground"; + text = "CellBackground"; + }; + + selection = { + background = "CellForeground"; + text = "CellBackground"; + }; + + primary = { + foreground = "#${config.theme.colors.text}"; + background = "#${config.theme.colors.base}"; + }; + }; + }; + }; + }; +} |