mirror of
https://github.com/danth/stylix
synced 2024-12-03 01:19:14 +00:00
2f29ecd3e4
Replaces mustache template with a theme specified using Home Manager options. This removes the need for separate templates for TOML and YAML formats. The new colors better align with other terminal modules (e.g. wezterm), and base24 schemes with bright- mnemonics are now supported. Closes #341.
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
# Documentation is available at:
|
|
# - https://alacritty.org/config-alacritty.html
|
|
# - `man 5 alacritty`
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
colors = config.lib.stylix.colors.withHashtag;
|
|
in
|
|
{
|
|
options.stylix.targets.alacritty.enable = config.lib.stylix.mkEnableTarget "Alacritty" true;
|
|
|
|
config = lib.mkIf config.stylix.targets.alacritty.enable {
|
|
programs.alacritty.settings = {
|
|
font = with config.stylix.fonts; {
|
|
normal = {
|
|
family = monospace.name;
|
|
style = "Regular";
|
|
};
|
|
size = sizes.terminal;
|
|
};
|
|
window.opacity = with config.stylix.opacity; terminal;
|
|
colors = with colors; {
|
|
primary = {
|
|
foreground = base05;
|
|
background = base00;
|
|
bright_foreground = base07;
|
|
};
|
|
selection = {
|
|
text = base05;
|
|
background = base02;
|
|
};
|
|
cursor = {
|
|
text = base00;
|
|
cursor = base05;
|
|
};
|
|
normal = {
|
|
black = base00;
|
|
white = base05;
|
|
inherit red green yellow blue magenta cyan;
|
|
};
|
|
bright = {
|
|
black = base03;
|
|
white = base07;
|
|
red = bright-red;
|
|
green = bright-green;
|
|
yellow = yellow;
|
|
blue = bright-blue;
|
|
magenta = bright-magenta;
|
|
cyan = bright-cyan;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|