-
Notifications
You must be signed in to change notification settings - Fork 47
/
fzf.nix
32 lines (30 loc) · 952 Bytes
/
fzf.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ 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"; };
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 = "red";
fg = "text";
header = "red";
info = "mauve";
pointer = "rosewater";
marker = "rosewater";
"fg+" = "text";
prompt = "mauve";
"hl+" = "red";
}
);
}