-
Notifications
You must be signed in to change notification settings - Fork 0
/
alacritty.nix
96 lines (88 loc) · 2.29 KB
/
alacritty.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{ config, pkgs, lib, themes, ... }:
with lib;
let cfg = config.custom.de.terms;
in {
options = {
custom.de.terms = {
alacritty = {
enable = mkOption { default = false; };
option_as_alt = mkOption { default = false; };
};
};
};
config = mkIf cfg.alacritty.enable {
programs.alacritty = {
enable = true;
settings = {
env = { TERM = "xterm-256color"; };
keyboard.bindings = [
{
key = "Equals";
mods = "Control";
action = "None";
}
{
key = 13;
mods = "Control|Shift";
action = "IncreaseFontSize";
}
];
window = {
padding = {
x = 3;
y = 3;
};
opacity = 0.85;
} // (if cfg.alacritty.option_as_alt then {
option_as_alt = "Both";
} else
{ });
font = {
normal = {
family = "FiraCode Nerd Font";
style = "Regular";
};
bold = {
family = "FiraCode Nerd Font";
style = "Bold";
};
italic = {
family = "FiraCode Nerd Font";
style = "Italic";
};
size = 12.0;
};
colors = {
primary = {
background = "${themes.background}";
foreground = "${themes.foreground}";
};
cursor = {
text = "${themes.cursorText}";
cursor = "${themes.cursor}";
};
normal = {
black = "${themes.black}";
red = "${themes.red}";
green = "${themes.green}";
yellow = "${themes.yellow}";
blue = "${themes.blue}";
magenta = "${themes.magenta}";
cyan = "${themes.cyan}";
white = "${themes.white}";
};
bright = {
black = "${themes.brightBlack}";
red = "${themes.brightRed}";
green = "${themes.brightGreen}";
yellow = "${themes.brightYellow}";
blue = "${themes.brightBlue}";
magenta = "${themes.brightMagenta}";
cyan = "${themes.brightCyan}";
white = "${themes.brightWhite}";
};
};
};
};
};
}