zsh: customize fzf
This commit is contained in:
parent
b06970472d
commit
abdedb4ce9
2 changed files with 46 additions and 0 deletions
|
@ -10,6 +10,10 @@ if command -v broot >/dev/null 2>&1; then
|
||||||
source "$ZDOTDIR/broot.zsh"
|
source "$ZDOTDIR/broot.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v fzf >/dev/null 2>&1; then
|
||||||
|
source "$ZDOTDIR/fzf.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up autoload for custom functions.
|
# Set up autoload for custom functions.
|
||||||
fpath=("$ZDOTDIR/functions" $fpath)
|
fpath=("$ZDOTDIR/functions" $fpath)
|
||||||
for filepath in $ZDOTDIR/functions/*; do
|
for filepath in $ZDOTDIR/functions/*; do
|
||||||
|
|
42
config/zsh/fzf.zsh
Normal file
42
config/zsh/fzf.zsh
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
fzf_colors=(
|
||||||
|
fg:#8185A7
|
||||||
|
fg+:bright-white:bold
|
||||||
|
bg+:-1
|
||||||
|
hl:yellow:regular
|
||||||
|
hl+:bright-yellow:bold
|
||||||
|
query:bright-white:regular
|
||||||
|
info:blue:bold
|
||||||
|
border:bright-black
|
||||||
|
scrollbar:white
|
||||||
|
separator:bright-black
|
||||||
|
label:yellow:bold
|
||||||
|
prompt:blue
|
||||||
|
pointer:red:bold
|
||||||
|
marker:green
|
||||||
|
spinner:yellow
|
||||||
|
)
|
||||||
|
|
||||||
|
fzf_bindings=(
|
||||||
|
ctrl-o:toggle-up
|
||||||
|
ctrl-t:toggle-all
|
||||||
|
ctrl-x:deselect-all
|
||||||
|
)
|
||||||
|
|
||||||
|
fzf_defaults=(
|
||||||
|
--reverse
|
||||||
|
--border=rounded
|
||||||
|
--scrollbar=┃
|
||||||
|
--prompt='"❯ "'
|
||||||
|
--pointer='" "'
|
||||||
|
--marker='" "'
|
||||||
|
--color="${(pj/,/)fzf_colors}"
|
||||||
|
--bind="${(pj/,/)fzf_bindings}"
|
||||||
|
)
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS="${(pj/ /)fzf_defaults}"
|
||||||
|
export FZF_CTRL_T_OPTS=--border-label='" Select file(s) "'
|
||||||
|
export FZF_CTRL_R_OPTS=--border-label='" History search "'
|
||||||
|
export FZF_ALT_C_OPTS=--border-label='" Change directory "'
|
||||||
|
|
||||||
|
unset fzf_colors fzf_bindings fzf_defaults
|
||||||
|
|
Loading…
Add table
Reference in a new issue