2022-02-27 19:48:22 +01:00
|
|
|
{ depot, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
2022-05-04 17:54:33 +02:00
|
|
|
bins = depot.nix.getBins pkgs.alacritty [ "alacritty" ];
|
2022-02-27 19:48:22 +01:00
|
|
|
|
2024-12-05 19:11:34 +01:00
|
|
|
# https://github.com/alacritty/alacritty-theme
|
|
|
|
themes = {
|
|
|
|
# dark = "alacritty_0_12";
|
|
|
|
dark = "google";
|
|
|
|
light = "dayfox";
|
|
|
|
};
|
|
|
|
|
2022-04-19 15:08:14 +02:00
|
|
|
config =
|
2023-04-22 18:37:08 +02:00
|
|
|
{
|
2024-12-05 19:11:34 +01:00
|
|
|
config = {
|
|
|
|
# sets the theme for this config (autogenerated file)
|
|
|
|
general.import = [ "~/.config/alacritty/alacritty-colors-autogen.toml" ];
|
|
|
|
font.size = 18;
|
|
|
|
scrolling.history = 100000;
|
|
|
|
};
|
2023-04-22 18:37:08 +02:00
|
|
|
# This disables the dpi-sensitive scaling (cause otherwise the font will be humongous on my laptop screen)
|
|
|
|
alacritty-env.WINIT_X11_SCALE_FACTOR = 1;
|
2022-04-19 15:08:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
alacritty = depot.nix.writeExecline "alacritty" { } (
|
|
|
|
(lib.concatLists (lib.mapAttrsToList (k: v: [ "export" k (toString v) ]) config.alacritty-env))
|
|
|
|
++ [
|
2024-12-05 19:11:34 +01:00
|
|
|
"backtick"
|
|
|
|
"-E"
|
|
|
|
"config"
|
|
|
|
[ depot.users.Profpatsch.xdg-config-home ]
|
|
|
|
|
2022-04-19 15:08:14 +02:00
|
|
|
bins.alacritty
|
|
|
|
"--config-file"
|
2024-12-05 19:11:34 +01:00
|
|
|
((pkgs.formats.toml { }).generate "alacritty.conf" config.config)
|
2022-04-19 15:08:14 +02:00
|
|
|
"$@"
|
|
|
|
]
|
|
|
|
);
|
2022-02-27 19:48:22 +01:00
|
|
|
|
2024-12-05 19:11:34 +01:00
|
|
|
alacritty-themes = pkgs.fetchFromGitHub {
|
|
|
|
owner = "alacritty";
|
|
|
|
repo = "alacritty-theme";
|
|
|
|
rev = "95a7d695605863ede5b7430eb80d9e80f5f504bc";
|
|
|
|
sha256 = "sha256-D37MQtNS20ESny5UhW1u6ELo9czP4l+q0S8neH7Wdbc=";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-02-27 19:48:22 +01:00
|
|
|
in
|
2024-12-05 19:11:34 +01:00
|
|
|
{
|
|
|
|
inherit
|
|
|
|
alacritty
|
|
|
|
alacritty-themes
|
|
|
|
themes;
|
|
|
|
|
|
|
|
}
|