only add fonts if we are in X

This commit is contained in:
Aaron Bieber 2020-07-15 18:31:11 -06:00
parent f1ede02867
commit c509cbbc9d

View File

@ -1,8 +1,10 @@
[[ -d ~/.fonts ]] && xset +fp ~/.fonts 2>/dev/null
[[ -d ~/.local/share/fonts ]] && xset +fp ~/.local/share/fonts/ 2>/dev/null
if [ ! -z $DISPLAY ]; then
[[ -d ~/.fonts ]] && xset +fp ~/.fonts 2>/dev/null
[[ -d ~/.local/share/fonts ]] && xset +fp ~/.local/share/fonts/ 2>/dev/null
for font in /usr/local/share/fonts/*; do
for font in /usr/local/share/fonts/*; do
xset +fp "${font}" 2>/dev/null
done
done
xset fp rehash
xset fp rehash
fi