dotfiles/modules/shell/fzf.nix

31 lines
643 B
Nix
Raw Normal View History

2022-05-06 13:29:25 +00:00
{ config, ... }: {
home-manager.users.${config.user} = {
programs.fzf.enable = true;
programs.fish = {
functions = {
projects = {
description = "Jump to a project";
body = ''
set projdir (ls $PROJ | fzf)
and cd $PROJ/$projdir
and commandline -f execute
'';
};
};
shellAbbrs = { lf = "ls -lh | fzf"; };
};
home.sessionVariables = let fzfCommand = "fd --type file";
in {
FZF_DEFAULT_COMMAND = fzfCommand;
FZF_CTRL_T_COMMAND = fzfCommand;
FZF_DEFAULT_OPTS = "-m --height 50% --border";
};
};
}