feat(fzf): Catppuccin -> Rose Pine
This commit is contained in:
parent
e83dd23931
commit
1c6a265081
2 changed files with 32 additions and 30 deletions
|
@ -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";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue