Check for nerd font and set env

This commit is contained in:
ViViDboarder 2024-11-27 12:30:37 -08:00
parent 2e7344776f
commit 16bb9b617a
3 changed files with 19 additions and 0 deletions

View File

@ -83,6 +83,12 @@ export LSCOLORS=ExFxCxDxBxegedabagacad
# Export colors
eval $($HOME/bin/derive_colors.py --export)
# Check for nerd font
if fc-list -q 'Symbols Nerd Font'; then
# Doesn't guarantee the font is in use, but it's a good guess
export TERM_NERD_FONT=1
fi
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
# export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'

View File

@ -154,6 +154,12 @@ export LSCOLORS=ExFxCxDxBxegedabagacad
# Export colors
eval $($HOME/bin/derive_colors.py --export)
# Check for nerd font
if fc-list -q 'Symbols Nerd Font'; then
# Doesn't guarantee the font is in use, but it's a good guess
export TERM_NERD_FONT=1
fi
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if type rg &> /dev/null; then

View File

@ -34,6 +34,13 @@ if status --is-interactive
# Export colors
eval ($HOME/bin/derive_colors.py --export --fish)
# Check for nerd font
if fc-list -q 'Symbols Nerd Font'
# Doesn't guarantee the font is in use, but it's a good guess
set -gx TERM_NERD_FONT 1
end
# Set fish theme based on newly exported colors
if set -q FISH_THEME
fish_theme "$FISH_THEME"