Skip to content

Commit

Permalink
feat: fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Nov 23, 2023
1 parent 8c64f53 commit 68d6b40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
4 changes: 1 addition & 3 deletions config/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
export VISUAL="$(command -v nvim 2>/dev/null || command -v vim)"
export EDITOR="$VISUAL"
export MANPAGER='nvim +Man!'
export FZF_COMPLETION_TRIGGER='~~'
# }}}


Expand Down Expand Up @@ -80,9 +81,6 @@
alias pythonServer="python3 -m http.server"
alias true_colors="bash ~/dotfiles/scripts.sh true_colors"

# key-bindings
bindkey -s "^f" "history | fzf^M"

# platform specific
if uname -r | grep -i -q 'microsoft'; then
alias cmd="cmd.exe"
Expand Down
18 changes: 17 additions & 1 deletion home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ in {
source "${config.xdg.stateHome}/nix/profiles/profile/etc/profile.d/nix.sh"
fi
'';
initExtra = "source ~/.zshrc";
initExtraBeforeCompInit = "source ~/.zshrc";
};

programs.bash.enable = true;
Expand All @@ -109,6 +109,22 @@ in {
enable = true;
};

programs.fzf = {
enable = true;
defaultOptions = [
"--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796"
"--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6"
"--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
"--layout=reverse"
];
changeDirWidgetOptions = [
"--preview 'exa --tree {} | head -200'"
];
fileWidgetOptions = [
"--preview 'bat --color=always {}'"
];
};

programs.tmux = {
enable = true;
sensibleOnTop = false;
Expand Down

0 comments on commit 68d6b40

Please sign in to comment.