25 lines
		
	
	
	
		
			593 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			593 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   osConfig,
 | |
|   ...
 | |
| }: let
 | |
|   inherit (lib) mkIf;
 | |
|   inherit (osConfig.ooknet.host) admin;
 | |
|   cfg = osConfig.ooknet.console.tools.fzf;
 | |
| in {
 | |
|   config = mkIf cfg.enable {
 | |
|     programs.fzf = {
 | |
|       enable = true;
 | |
|       enableFishIntegration = mkIf (admin.shell == "fish") true;
 | |
|       defaultCommand = "rg --files --hidden";
 | |
|       changeDirWidgetOptions = [
 | |
|         "--preview 'eza --icons -L 3 -T --color always {} | head -200'"
 | |
|         "--exact"
 | |
|       ];
 | |
|       fileWidgetCommand = "rg --files";
 | |
|       fileWidgetOptions = [
 | |
|         "--preview 'bat --color=always {}'"
 | |
|       ];
 | |
|     };
 | |
|   };
 | |
| }
 |