Files
m3ta-home/profiles/base/cli-tools/fzf.nix
m3ta-chironandClaude Opus 5.5 396c41d99d chore(shell): remove Fish configuration
Nushell is the only interactive shell now. base.shell.fish.enable stays as a
deprecated no-op with a warning, because AZ-NIX-CLIENTS and AZ-NIX-SERVERS
still set it and would otherwise fail to evaluate after a lock update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:23:07 +01:00

48 lines
1.7 KiB
Nix

# Fuzzy finder with nix-colors palette and Wayland clipboard integration.
{
config,
lib,
options,
...
}:
with lib; let
cfg = config.base.cliTools.fzf;
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
in {
# Enabled by default — base modules are always-on.
options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;};
config = mkIf cfg.enable {
programs.fzf =
{
enable = true;
colors = {
"fg" = "#${config.colorScheme.palette.base05}";
"bg" = "#${config.colorScheme.palette.base00}";
"hl" = "#${config.colorScheme.palette.base0E}";
"fg+" = "#${config.colorScheme.palette.base05}";
"bg+" = "#${config.colorScheme.palette.base02}";
"hl+" = "#${config.colorScheme.palette.base0E}";
"info" = "#${config.colorScheme.palette.base09}";
"prompt" = "#${config.colorScheme.palette.base0B}";
"pointer" = "#${config.colorScheme.palette.base08}";
"marker" = "#${config.colorScheme.palette.base08}";
"spinner" = "#${config.colorScheme.palette.base09}";
"header" = "#${config.colorScheme.palette.base03}";
};
defaultOptions = [
"--preview='bat --color=always -n {}'"
"--bind 'ctrl-/:toggle-preview'"
"--header 'Press CTRL-Y to copy command into clipboard'"
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
];
defaultCommand = "fd --type f --exclude .git --follow --hidden";
}
// (
if options.programs.fzf ? changeDirWidget
then {changeDirWidget.command = changeDirWidgetCommand;}
else {inherit changeDirWidgetCommand;}
);
};
}