From a8bb45cceb1c7561cf6fbe97d9f689e24d6f7e97 Mon Sep 17 00:00:00 2001 From: Luca Bilke <luca@bil.ke> Date: Mon, 10 Jun 2024 23:04:52 +0200 Subject: [PATCH] clean up fzf configuration --- .config/lf/lfrc | 14 +++++--------- .config/zsh/.zprofile | 5 +++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index f3d5af9c..f62e8e5e 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -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' )" diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index a2dd92fb..81d3a0cb 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -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' '[1;31m')" export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"