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 = ''
|
2022-06-20 12:39:41 +00:00
|
|
|
set projdir (ls ${config.homePath}/dev/personal | fzf)
|
|
|
|
and cd ${config.homePath}/dev/personal/$projdir
|
2022-05-06 13:29:25 +00:00
|
|
|
and commandline -f execute
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
shellAbbrs = { lf = "ls -lh | fzf"; };
|
|
|
|
};
|
|
|
|
|
2022-05-29 17:44:45 +00:00
|
|
|
# Global fzf configuration
|
2022-05-06 13:29:25 +00:00
|
|
|
home.sessionVariables = let fzfCommand = "fd --type file";
|
|
|
|
in {
|
|
|
|
FZF_DEFAULT_COMMAND = fzfCommand;
|
|
|
|
FZF_CTRL_T_COMMAND = fzfCommand;
|
|
|
|
FZF_DEFAULT_OPTS = "-m --height 50% --border";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|