diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-10-05 22:01:05 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-10-05 22:01:05 +0530 |
| commit | ebd79a2876eeada0deaf349bf91a3e12b23326d2 (patch) | |
| tree | 06b1209f2df5363934a76f041e085b6941ed1dfa /modules/tools/utils | |
| parent | 3c21327938a249e2f61e32dee3c9ebbaff157d63 (diff) | |
| download | home-manager-config-ebd79a2876eeada0deaf349bf91a3e12b23326d2.tar.gz home-manager-config-ebd79a2876eeada0deaf349bf91a3e12b23326d2.zip | |
Moved fzf configuration under modules/utils/fzf.
Diffstat (limited to 'modules/tools/utils')
| -rw-r--r-- | modules/tools/utils/default.nix | 7 | ||||
| -rw-r--r-- | modules/tools/utils/fzf/default.nix | 42 |
2 files changed, 49 insertions, 0 deletions
diff --git a/modules/tools/utils/default.nix b/modules/tools/utils/default.nix new file mode 100644 index 0000000..5d758fc --- /dev/null +++ b/modules/tools/utils/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./fzf + ]; +} diff --git a/modules/tools/utils/fzf/default.nix b/modules/tools/utils/fzf/default.nix new file mode 100644 index 0000000..e6378bc --- /dev/null +++ b/modules/tools/utils/fzf/default.nix @@ -0,0 +1,42 @@ +{ config, lib,... }: + +{ + options.tools.utils.fzf = { + enable = lib.mkEnableOption "Enables fzf."; + }; + + config = lib.mkIf config.tools.utils.fzf.enable { + programs.fzf.enable = true; + programs.fzf.defaultOptions = [ + "--height 100%" + "--layout=reverse" + ''--pointer=\"${if config.fonts.nerdfont.fira-code.enable then " " else ">"}\"'' + ''--header=\" \"'' + ''--prompt=\" \"'' + ''--marker=\"✓ \"'' + "--border=none" + "--cycle" + "--no-info" + "--margin=\"1,2\"" + ]; + + programs.fzf.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) + }; + }; +} |
