diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-12 22:50:38 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-12 22:50:38 +0530 |
| commit | fb6fae78379276b8d8be97ac6fe7a4771cc61b0d (patch) | |
| tree | 988aace684f155303c211bcbeecbc6128199d65d /modules/tools/fzf | |
| parent | 532107493512bb56581df1c60166830e44bd5076 (diff) | |
| download | home-manager-config-fb6fae78379276b8d8be97ac6fe7a4771cc61b0d.tar.gz home-manager-config-fb6fae78379276b8d8be97ac6fe7a4771cc61b0d.zip | |
Added formatter and performed formatting
Diffstat (limited to 'modules/tools/fzf')
| -rw-r--r-- | modules/tools/fzf/default.nix | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/modules/tools/fzf/default.nix b/modules/tools/fzf/default.nix index 27350d4..4061b4f 100644 --- a/modules/tools/fzf/default.nix +++ b/modules/tools/fzf/default.nix @@ -1,56 +1,54 @@ -{ config, lib,... }: +{ config, lib, ... }: { options.tools.fzf = { enable = lib.mkEnableOption "Enables fzf."; }; - config = let - shellIntegration = '' -${if config.tools.zsh.enable then - "eval \"$(fzf --zsh)\"" -else "eval \"$(fzf --bash)\""} - ''; - in lib.mkIf config.tools.fzf.enable { - programs.fzf = { - enable = true; - - defaultOptions = [ - "--height 100%" - "--layout=reverse" - ''--pointer=\" \"'' - ''--header=\" \"'' - ''--prompt=\" \"'' - ''--marker=\"✓ \"'' - "--border=none" - "--cycle" - "--no-info" - "--margin=\"1,2\"" - ]; - - colors = with config.scheme.withHashtag; { - fg = base05; # Foreground - bg = "-1"; # Background (-1 for transparent) - hl = base0D; # Highlight - - "fg+" = base07; # Foreground for selected item - "bg+" = "-1"; # Background for selected item - "hl+" = base0D; # Highlight for selected item - - gutter = "-1"; # Remove the white margin at the left - - info = base0B; # Info text (usually count of items) - border = base03; # Border color - prompt = base0A; # Prompt text color - pointer = base0F; # Pointer color (e.g., > for selected) - marker = base0C; # Marker color (e.g., for multi-select) - spinner = base0C; # Spinner color (during search) + config = + let + shellIntegration = '' + ${if config.tools.zsh.enable then "eval \"$(fzf --zsh)\"" else "eval \"$(fzf --bash)\""} + ''; + in + lib.mkIf config.tools.fzf.enable { + programs.fzf = { + enable = true; + + defaultOptions = [ + "--height 100%" + "--layout=reverse" + ''--pointer=\" \"'' + ''--header=\" \"'' + ''--prompt=\" \"'' + ''--marker=\"✓ \"'' + "--border=none" + "--cycle" + "--no-info" + "--margin=\"1,2\"" + ]; + + colors = with config.scheme.withHashtag; { + fg = base05; # Foreground + bg = "-1"; # Background (-1 for transparent) + hl = base0D; # Highlight + + "fg+" = base07; # Foreground for selected item + "bg+" = "-1"; # Background for selected item + "hl+" = base0D; # Highlight for selected item + + gutter = "-1"; # Remove the white margin at the left + + info = base0B; # Info text (usually count of items) + border = base03; # Border color + prompt = base0A; # Prompt text color + pointer = base0F; # Pointer color (e.g., > for selected) + marker = base0C; # Marker color (e.g., for multi-select) + spinner = base0C; # Spinner color (during search) + }; }; - }; - programs.zsh.initContent = lib.mkIf config.programs.zsh.enable - (lib.mkAfter shellIntegration); - programs.bash.initExtra = lib.mkIf config.programs.bash.enable - (lib.mkAfter shellIntegration); - }; + programs.zsh.initContent = lib.mkIf config.programs.zsh.enable (lib.mkAfter shellIntegration); + programs.bash.initExtra = lib.mkIf config.programs.bash.enable (lib.mkAfter shellIntegration); + }; } |
