1
0
Fork 0

clean up fzf configuration

This commit is contained in:
Luca Bilke 2024-06-10 23:04:52 +02:00
parent efd5d608b0
commit a8bb45cceb
2 changed files with 8 additions and 11 deletions

View file

@ -120,7 +120,6 @@ cmd fzf ${{
file="$(eval "$input" | fzf \
--query "$query" \
--delimiter "$delimiter" \
--cycle \
--nth="$field" \
--with-nth="$field" \
--preview-window="right,$width" \
@ -172,20 +171,17 @@ cmd find_project ${{
clear
project="$(echo $dirs | xargs -n1 basename | fzf \
--cycle \
--preview-window="right,33%" \
--preview-window="right,50%" \
--bind="space:accept,focus:transform-preview-label(echo {})" \
--scheme='history' \
--history="$histfile" \
--header="Projects" \
--preview='
f={}
file=$(echo $XDG_DOCUMENTS_DIR/dev/*/* | xargs -n1 | sed -n "/\/$f$/p")
if [ -f "$file" ] && [ -r "$file" ]; then
head -n $LINES "$file"
elif [ -d "$file" ] && [ -r "$file" ]; then
ls -pLHAN1 --color=always --group-directories-first "$file"
fi
dir=$(echo $XDG_DOCUMENTS_DIR/dev/*/* | xargs -n1 | sed -n "/\/$f$/p")
git -C $dir status
echo
git -C $dir log
' |
tr -d '\n'
)"

View file

@ -30,11 +30,12 @@ export LC_ALL=
# Settings
export VIRTUAL_ENV_DISABLE_PROMPT=1
export FZF_DEFAULT_OPTS="\
--layout=reverse --height 40%\
--layout=reverse --cycle \
--color=fg:#c0caf5,bg:,hl:#ff9e64 \
--color=fg+:#c0caf5,bg+:,hl+:#ff9e64 \
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a"
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a \
"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"