2024-04-20 13:42:06 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2022-04-29 01:40:21 +00:00
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
options = {
|
|
|
|
alacritty = {
|
|
|
|
enable = lib.mkEnableOption {
|
|
|
|
description = "Enable Alacritty.";
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf (config.gui.enable && config.alacritty.enable) {
|
2022-05-22 23:43:46 +00:00
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
xsession.windowManager.i3.config.terminal = "alacritty";
|
|
|
|
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";
|
|
|
|
programs.alacritty = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
window = {
|
|
|
|
dimensions = {
|
|
|
|
columns = 85;
|
|
|
|
lines = 30;
|
|
|
|
};
|
|
|
|
padding = {
|
|
|
|
x = 20;
|
|
|
|
y = 20;
|
|
|
|
};
|
|
|
|
opacity = 1.0;
|
2022-04-29 01:40:21 +00:00
|
|
|
};
|
2022-05-22 23:43:46 +00:00
|
|
|
scrolling.history = 10000;
|
2024-04-20 13:42:06 +00:00
|
|
|
font = {
|
|
|
|
size = 14.0;
|
|
|
|
};
|
2022-05-22 23:43:46 +00:00
|
|
|
key_bindings = [
|
2022-07-06 19:50:10 +00:00
|
|
|
# Used for word completion in fish_user_key_bindings
|
2022-05-22 23:43:46 +00:00
|
|
|
{
|
2022-11-01 00:47:33 +00:00
|
|
|
key = "Return";
|
|
|
|
mods = "Shift";
|
2022-05-22 23:43:46 +00:00
|
|
|
chars = "\\x1F";
|
|
|
|
}
|
2022-07-06 19:50:10 +00:00
|
|
|
# Used for searching nixpkgs in fish_user_key_bindings
|
|
|
|
{
|
|
|
|
key = "N";
|
|
|
|
mods = "Control|Shift";
|
|
|
|
chars = "\\x11F";
|
|
|
|
}
|
2022-05-22 23:43:46 +00:00
|
|
|
{
|
2022-10-31 00:15:32 +00:00
|
|
|
key = "H";
|
|
|
|
mods = "Control|Shift";
|
2022-05-22 23:43:46 +00:00
|
|
|
mode = "~Vi";
|
|
|
|
action = "ToggleViMode";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "Return";
|
|
|
|
mode = "Vi";
|
|
|
|
action = "ToggleViMode";
|
|
|
|
}
|
|
|
|
# Used to enable $ keybind in Vi mode
|
|
|
|
{
|
|
|
|
key = 5; # Scancode for key4
|
|
|
|
mods = "Shift";
|
|
|
|
mode = "Vi|~Search";
|
|
|
|
action = "Last";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
colors = {
|
|
|
|
primary = {
|
2022-11-03 01:29:14 +00:00
|
|
|
background = config.theme.colors.base00;
|
|
|
|
foreground = config.theme.colors.base05;
|
2022-05-22 23:43:46 +00:00
|
|
|
};
|
|
|
|
cursor = {
|
|
|
|
text = "#1d2021";
|
2022-11-03 01:29:14 +00:00
|
|
|
cursor = config.theme.colors.base05;
|
2022-05-22 23:43:46 +00:00
|
|
|
};
|
|
|
|
normal = {
|
|
|
|
black = "#1d2021";
|
2022-11-03 01:29:14 +00:00
|
|
|
red = config.theme.colors.base08;
|
|
|
|
green = config.theme.colors.base0B;
|
|
|
|
yellow = config.theme.colors.base0A;
|
|
|
|
blue = config.theme.colors.base0D;
|
|
|
|
magenta = config.theme.colors.base0E;
|
|
|
|
cyan = config.theme.colors.base0C;
|
|
|
|
white = config.theme.colors.base05;
|
2022-05-22 23:43:46 +00:00
|
|
|
};
|
|
|
|
bright = {
|
2022-11-03 01:29:14 +00:00
|
|
|
black = config.theme.colors.base03;
|
|
|
|
red = config.theme.colors.base09;
|
|
|
|
green = config.theme.colors.base01;
|
|
|
|
yellow = config.theme.colors.base02;
|
|
|
|
blue = config.theme.colors.base04;
|
|
|
|
magenta = config.theme.colors.base06;
|
|
|
|
cyan = config.theme.colors.base0F;
|
|
|
|
white = config.theme.colors.base07;
|
2022-05-22 23:43:46 +00:00
|
|
|
};
|
2022-05-06 03:01:56 +00:00
|
|
|
};
|
2022-05-22 23:43:46 +00:00
|
|
|
draw_bold_text_with_bright_colors = false;
|
2022-05-06 03:01:56 +00:00
|
|
|
};
|
2022-04-28 22:55:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|