2024-07-30 15:06:34 +01:00
|
|
|
{ config, fonts, ... }:
|
2024-07-03 07:15:39 +01:00
|
|
|
{
|
|
|
|
programs.alacritty = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
font = {
|
|
|
|
size = fonts.sizes.applications;
|
|
|
|
normal = {
|
|
|
|
family = fonts.monospace.name;
|
|
|
|
style = "Regular";
|
|
|
|
};
|
|
|
|
};
|
2024-07-16 09:56:17 +01:00
|
|
|
window = {
|
|
|
|
dynamic_title = true;
|
|
|
|
padding = {
|
|
|
|
x = 5;
|
|
|
|
y = 5;
|
|
|
|
};
|
|
|
|
};
|
2024-07-03 07:15:39 +01:00
|
|
|
live_config_reload = true;
|
|
|
|
selection.save_to_clipboard = true;
|
|
|
|
mouse.hide_when_typing = true;
|
2024-07-30 15:06:34 +01:00
|
|
|
colors =
|
|
|
|
let
|
|
|
|
mapColours =
|
|
|
|
isBright:
|
|
|
|
(builtins.listToAttrs (
|
|
|
|
builtins.map
|
|
|
|
(col: {
|
|
|
|
# Alacritty uses Yellow instead of Orange for BASE09
|
|
|
|
name = if col == "orange" then "yellow" else col;
|
|
|
|
value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}";
|
|
|
|
})
|
|
|
|
[
|
|
|
|
"red"
|
|
|
|
"orange"
|
|
|
|
"green"
|
|
|
|
"cyan"
|
|
|
|
"blue"
|
|
|
|
"magenta"
|
|
|
|
]
|
|
|
|
));
|
|
|
|
mapNamedColours = mapColours false;
|
|
|
|
mapNamedBrightColours = mapColours true;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
draw_bold_text_with_bright_colors = false;
|
|
|
|
primary = with config.scheme; {
|
|
|
|
background = "0x${base00}";
|
|
|
|
foreground = "0x${base05}";
|
|
|
|
};
|
|
|
|
cursor = with config.scheme; {
|
|
|
|
cursor = "0x${base05}";
|
|
|
|
text = "0x${base00}";
|
|
|
|
};
|
|
|
|
normal =
|
|
|
|
with config.scheme;
|
|
|
|
{
|
|
|
|
black = "0x${base00-hex}";
|
|
|
|
white = "0x${base05-hex}";
|
|
|
|
}
|
|
|
|
// mapNamedColours;
|
|
|
|
bright =
|
|
|
|
with config.scheme;
|
|
|
|
{
|
|
|
|
black = "0x${base03-hex}";
|
|
|
|
white = "0x${base07-hex}";
|
|
|
|
}
|
|
|
|
// mapNamedBrightColours;
|
2024-07-03 07:15:39 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|