From 6459a2a7ef910211b6de9586f7f6f9f72983da72 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 1 Apr 2021 14:43:16 +0200 Subject: [PATCH] fzf: Add better default commands and options --- users/simon/modules/programs.nix | 1 - users/simon/modules/zsh.nix | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/users/simon/modules/programs.nix b/users/simon/modules/programs.nix index 63d4a72..0dbd1b8 100644 --- a/users/simon/modules/programs.nix +++ b/users/simon/modules/programs.nix @@ -72,7 +72,6 @@ in libnotify # notify-send # function eye candy - fzf # fuzzy finder pv # monitor progress in pipe # end user programs diff --git a/users/simon/modules/zsh.nix b/users/simon/modules/zsh.nix index b2b8b31..6d949af 100644 --- a/users/simon/modules/zsh.nix +++ b/users/simon/modules/zsh.nix @@ -11,7 +11,20 @@ let in { programs = { - fzf.enable = true; + fzf = { + enable = true; + changeDirWidgetCommand = "fd --color always --type d"; + changeDirWidgetOptions = [ "--preview 'exa --tree --color=always -L 4 {}'" ]; + defaultCommand = "fd --color always"; + defaultOptions = [ + "--ansi" + "--color=bg+:#073642,bg:#002b36,spinner:#2aa198,hl:#268bd2" + "--color=fg:#839496,header:#268bd2,info:#b58900,pointer:#2aa198" + "--color=marker:#2aa198,fg+:#eee8d5,prompt:#b58900,hl+:#268bd2" + ]; + fileWidgetCommand = "fd --color always --type f"; + fileWidgetOptions = [ "--preview 'head -n 100 {}'" ]; + }; direnv = { enable = true; enableNixDirenvIntegration = true;