diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-15 20:02:29 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-15 20:03:04 +0530 |
| commit | 01aaa7ad39c1fe8af6ffbca31abbab27dbfefc95 (patch) | |
| tree | 88560b79fa71e3b83d9d9aca6d1bb40673a1a170 /modules/programs/fzf | |
| parent | 2c573bb0c437b83fe629a9a5b818c976d2dfd796 (diff) | |
| download | home-manager-config-01aaa7ad39c1fe8af6ffbca31abbab27dbfefc95.tar.gz home-manager-config-01aaa7ad39c1fe8af6ffbca31abbab27dbfefc95.zip | |
refactor: organized the modules into better categories
Instead of lumping everything in modules/programs we are separating them
into separate directories in modules/
Diffstat (limited to 'modules/programs/fzf')
| -rw-r--r-- | modules/programs/fzf/assertions.nix | 13 | ||||
| -rw-r--r-- | modules/programs/fzf/default.nix | 51 |
2 files changed, 0 insertions, 64 deletions
diff --git a/modules/programs/fzf/assertions.nix b/modules/programs/fzf/assertions.nix deleted file mode 100644 index 7c2e79c..0000000 --- a/modules/programs/fzf/assertions.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, ... }: -{ - assertions = [ - { - assertion = - !config.programs.fzf.enable || config.programs.zsh.enable || config.programs.bash.enable; - message = '' - programs.fzf is enabled but neither programs.zsh.enable nor programs.bash.enable is set. - fzf shell integration requires zsh or bash. Please enable at least one. - ''; - } - ]; -} diff --git a/modules/programs/fzf/default.nix b/modules/programs/fzf/default.nix deleted file mode 100644 index 7671b3c..0000000 --- a/modules/programs/fzf/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ config, lib, ... }: - -# FZF - Fuzzy finder, CLI fuzzy search tool -{ - imports = [ ./assertions.nix ]; - - config = - let - shellIntegration = '' - ${if config.programs.zsh.enable then "eval \"$(fzf --zsh)\"" else "eval \"$(fzf --bash)\""} - ''; - in - lib.mkIf config.programs.fzf.enable { - programs.fzf = { - 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); - }; -} |
