dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 92c22746029b0c9b480ddde564ddd45aba916c9c
parent 09bee6a151696003d332a502e410c5d2120cbbee
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Tue,  6 Sep 2022 13:01:43 +0200

Fix bat coloring in fzf preview in Vim

That's a lot of nested stuff.

Diffstat:
Mshell/aliases | 1-
Mshell/functions | 3++-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell/aliases b/shell/aliases @@ -31,5 +31,4 @@ alias bwl="rbw lock" alias yt="pipe-viewer" alias gotop='sudo gotop -C $XDG_CONFIG_HOME/gotop/gotop.conf' [ -n "$VIM_TERMINAL" ] && alias vim=vimsend -{ [ -f ~/.config/dark-theme ] && alias bat="bat --theme=1337 --color=always"; } || alias bat="bat --theme=GitHub --color=always" [ -f "$DOTFILES"/docs/pbib/README.md ] && alias pbib='vim +$(nl -b a '$DOTFILES"/docs/pbib/README.md | fzf --with-nth 2.. -e -q '^# ' | sed 's/[^0-9]//g') "$DOTFILES"/docs/pbib/README.md" diff --git a/shell/functions b/shell/functions @@ -85,7 +85,8 @@ if command -v virtualenv &> /dev/null; then fi # fzf-reliant functions if [ -d ~/.config/fzf ]; then - export FZF_DEFAULT_OPTS="--preview-window right:100:hidden:wrap --bind '?:toggle-preview' --preview='(bat --style=numbers --color=always {} || cat {}) 2>/dev/null | head -500'" + { [ -f ~/.config/dark-theme ] && export BAT_THEME='1337'; } || export BAT_THEME='GitHub' + export FZF_DEFAULT_OPTS="--preview-window right:100:hidden:wrap --bind '?:toggle-preview' --preview='(bat --style=numbers --theme=$BAT_THEME --color=always {} || cat {}) 2>/dev/null | head -500'" export FZF_DEFAULT_COMMAND="ag -l -g \"\"" # script edit se() {