feat(fzf): Catppuccin -> Rose Pine

This commit is contained in:
punkfairie 2024-10-19 22:00:01 -07:00
parent e83dd23931
commit 1c6a265081
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 32 additions and 30 deletions

View file

@ -1,34 +1,36 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.fzf.catppuccin;
enable = cfg.enable && config.programs.fzf.enable;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in
{
options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt { name = "fzf"; } // {
accent = lib.ctp.mkAccentOpt "fzf";
};
config,
lib,
...
}: let
cfg = config.programs.fzf.rose-pine;
enable = cfg.enable && config.programs.fzf.enable;
palette = (lib.importJSON "../../.sources/palette.json").${cfg.flavor}.colors;
in {
options.programs.fzf.rose-pine =
lib.rp.mkRosePineOpt {name = "fzf";};
config.programs.fzf.colors =
lib.mkIf enable
# Manually populate with colors from catppuccin/fzf
# The ordering is meant to match the order of catppuccin/fzf to make comparison easier
(
lib.attrsets.mapAttrs (_: color: palette.${color}.hex) {
"bg+" = "surface0";
bg = "base";
spinner = "rosewater";
hl = cfg.accent;
fg = "text";
header = cfg.accent;
info = cfg.accent;
pointer = cfg.accent;
marker = cfg.accent;
"fg+" = "text";
prompt = cfg.accent;
"hl+" = cfg.accent;
}
);
# Manually populate with colors from rose-pine/fzf
# The ordering is meant to match the order of rose-pine/fzf to make
# comparison easier
(
lib.attrsets.mapAttrs (_: color: palette.${color}.hex) {
fg = "subtle";
bg = "base";
hl = "rose";
"fg+" = "text";
"bg+" = "overlay";
"hl+" = "rose";
border = "highlight-med";
header = "pine";
gutter = "base";
spinner = "gold";
info = "foam";
pointer = "iris";
marker = "love";
prompt = "subtle";
}
);
}

View file

@ -17,7 +17,7 @@ in {
lib.mkOption {
inherit type;
default = config.rose-pine.${attr};
description = "Rose Pine ${attr} for ${name}";
description = "Rosé Pine ${attr} for ${name}";
};
# string -> a