mirror of
https://github.com/danth/stylix
synced 2024-11-21 19:53:10 +00:00
fzf: use Home Manager color options (#454)
home-manager provides a programs.fzf.colors option to provide colors. This module basically reimplemented the logic Home Manager has as well.
This commit is contained in:
parent
7cdbd12817
commit
1ff9d37d27
1 changed files with 7 additions and 13 deletions
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
mkFzfKeyValue = lib.generators.mkKeyValueDefault { } ":";
|
||||
{
|
||||
options.stylix.targets.fzf = {
|
||||
enable = config.lib.stylix.mkEnableTarget "Fzf" true;
|
||||
};
|
||||
|
||||
colorConfig = with config.lib.stylix.colors.withHashtag;
|
||||
lib.concatStringsSep "," (lib.mapAttrsToList mkFzfKeyValue {
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fzf.enable) {
|
||||
programs.fzf.colors = with config.lib.stylix.colors.withHashtag; {
|
||||
"bg" = base00;
|
||||
"bg+" = base01;
|
||||
"fg" = base04;
|
||||
|
@ -16,14 +18,6 @@ let
|
|||
"pointer" = base0C;
|
||||
"prompt" = base0A;
|
||||
"spinner" = base0C;
|
||||
});
|
||||
in
|
||||
{
|
||||
options.stylix.targets.fzf = {
|
||||
enable = config.lib.stylix.mkEnableTarget "Fzf" true;
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fzf.enable) {
|
||||
programs.fzf.defaultOptions = lib.mkAfter [ "--color=${colorConfig}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue