Use TOML format for Alacritty configuration
This commit is contained in:
parent
102ae3fe62
commit
774d0df25d
2 changed files with 12 additions and 14 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ lib, pkgs, nixosConfig, ... }:
|
||||
let
|
||||
solarized = import ./solarized.nix;
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
|
||||
#nixosConfig.jalr.terminalEmulator.command = pkgs.writeShellScriptBin "alacritty-sway-cwd" ''
|
||||
# this_alacritty_pid="$(swaymsg -t get_tree | ${pkgs.jq} -e 'recurse(.nodes[]?) | select((.focused==true) and (.app_id=="Alacritty")).pid')"
|
||||
|
|
@ -144,18 +145,15 @@ in
|
|||
enable = nixosConfig.jalr.gui.enable;
|
||||
};
|
||||
|
||||
# The option `home-manager.users.jalr.xdg.configFile.dark.alacritty/alacritty-dark.yml' does not exist
|
||||
|
||||
/*
|
||||
xdg.configFile = builtins.mapAttrs (colorScheme: cfg: {
|
||||
"alacritty/alacritty-${colorScheme}.yml" = lib.replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg);
|
||||
}) settings;
|
||||
*/
|
||||
|
||||
xdg.configFile = lib.attrsets.mapAttrs'
|
||||
(colorScheme: cfg: lib.attrsets.nameValuePair "alacritty/alacritty-${colorScheme}.yml" {
|
||||
text = lib.replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg);
|
||||
})
|
||||
(colorScheme: cfg:
|
||||
let name = "alacritty-${colorScheme}.toml";
|
||||
in
|
||||
lib.attrsets.nameValuePair "alacritty/${name}" {
|
||||
source = tomlFormat.generate name cfg;
|
||||
target = "alacritty/${name}";
|
||||
}
|
||||
)
|
||||
settings;
|
||||
|
||||
programs.fish.functions = {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ let
|
|||
applicationConfig = [
|
||||
{
|
||||
dir = "~/.config/alacritty";
|
||||
light = "alacritty-light.yml";
|
||||
dark = "alacritty-dark.yml";
|
||||
target = "alacritty.yml";
|
||||
light = "alacritty-light.toml";
|
||||
dark = "alacritty-dark.toml";
|
||||
target = "alacritty.toml";
|
||||
}
|
||||
{
|
||||
dir = "~/.config/wofi";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue