Add alacritty configuration and use it as default

This commit is contained in:
ulic-youthlic 2025-06-24 21:42:12 +08:00
parent b2846cc484
commit 6f6b32612d
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 71 additions and 3 deletions

View file

@ -37,6 +37,7 @@
atuin.enable = true;
chromium.enable = true;
thunderbird.enable = true;
alacritty.enable = true;
# espanso.enable = true;
};
};

View file

@ -42,6 +42,7 @@
chromium.enable = true;
espanso.enable = true;
ion.enable = true;
alacritty.enable = true;
};
};

View file

@ -35,7 +35,7 @@
polkit-kde-agent = getExe' pkgs.kdePackages.polkit-kde-agent-1 "polkit-kde-agent";
wpctl = getExe' pkgs.wireplumber "wpctl";
swaybg = getExe pkgs.swaybg;
ghostty = getExe config.programs.ghostty.package;
alacritty = getExe config.programs.alacritty.package;
wl-paste = getExe' pkgs.wl-clipboard "wl-paste";
cliphist = getExe' pkgs.cliphist "cliphist";
cliphist-fuzzel-img = getExe' pkgs.cliphist "cliphist-fuzzel-img";
@ -57,7 +57,7 @@ in
])
(plain "Mod+T" [
(spawn [
ghostty
alacritty
])
])
(plain "Mod+Shift+T" [
@ -471,6 +471,10 @@ in
app-id = "^com\\.mitchellh\\.ghostty$";
is-active = true;
}
{
app-id = "^Alacritty$";
is-active = true;
}
])
(leaf "draw-border-with-background" [false])
])
@ -480,6 +484,10 @@ in
app-id = "^com\\.mitchellh\\.ghostty$";
is-active = false;
}
{
app-id = "^Alacritty$";
is-active = false;
}
])
(leaf "opacity" [0.8])
(leaf "draw-border-with-background" [false])

View file

@ -0,0 +1,27 @@
[general]
ipc_socket = true
live_config_reload = true
[window]
dynamic_padding = true
opacity = 0.8
blur = true
[scrolling]
history = 100000
multiplier = 5
[font]
size = 16
[bell]
duration = 1
[selection]
save_to_clipboard = true
[terminal]
osc52 = "CopyPaste"
[mouse]
hide_when_typing = true

View file

@ -0,0 +1,30 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.youthlic.programs.alacritty;
in {
options = {
youthlic.programs.alacritty = {
enable = lib.mkEnableOption "alacritty";
};
};
config = lib.mkIf cfg.enable {
programs.alacritty = {
enable = true;
package = pkgs.alacritty_git;
settings =
(./alacritty.toml |> builtins.readFile |> builtins.fromTOML)
// {
colors = lib.mkForce {};
font.size = lib.mkForce 16;
window.opacity = lib.mkForce 0.8;
general.import = [
"${pkgs.alacritty-theme}/share/alacritty-theme/gruvbox_dark.toml"
];
};
};
};
}

View file

@ -30,5 +30,6 @@
./fzf.nix
./eza.nix
./ion.nix
./alacritty
];
}

View file

@ -29,7 +29,7 @@ in {
terminal-exec = {
enable = true;
settings = {
default = ["com.mitchellh.ghostty.desktop"];
default = ["Alacritty.desktop"];
};
};
mime = {