dotfiles/zsh/.zshrc.d/fzf.zsh
2024-12-02 17:23:50 -06:00

20 lines
738 B
Bash

# ~/.zshrc.d/fzf.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
## default opts uses Catppuccin (mocha) color palette
export FZF_DEFAULT_OPTS='--color=bg+:#302D41,bg:#1E1E2E,spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD'
## completion trigger
export FZF_COMPLETION_TRIGGER="~~"
## default source for fzf
export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git"
# CTRL-R
# CTRL-Y to copy the command into clipboard using wl-copy
export FZF_CTRL_R_OPTS="
--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'
--color header:italic
--header 'Press CTRL-Y to copy command into clipboard'"