term_font: Add more paths for Alacritty. Closes #911
This commit is contained in:
parent
023e3ee891
commit
56821a30e4
2 changed files with 12 additions and 2 deletions
|
@ -24,4 +24,4 @@ script:
|
|||
# The if statement is here to invert the exit code from grep.
|
||||
# grep normally errors if no match is found but we want the opposite.
|
||||
# We invert it so grep fails if a match is found.
|
||||
# - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi
|
||||
- if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi
|
||||
|
|
12
neofetch
12
neofetch
|
@ -1978,8 +1978,18 @@ get_term_font() {
|
|||
|
||||
case "$term" in
|
||||
"alacritty"*)
|
||||
if [[ -f "${XDG_CONFIG_HOME}/alacritty.yml" ]]; then
|
||||
alacritty_file="${XDG_CONFIG_HOME}/alacritty.yml"
|
||||
|
||||
elif [[ -f "${XDG_CONFIG_HOME}/alacritty/alacritty.yml" ]]; then
|
||||
alacritty_file="${XDG_CONFIG_HOME}/alacritty/alacritty.yml"
|
||||
|
||||
elif [[ -f "${HOME}/.alacritty.yml" ]]; then
|
||||
alacritty_file="${HOME}/.alacritty.yml"
|
||||
fi
|
||||
|
||||
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' \
|
||||
"${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
|
||||
"$alacritty_file")"
|
||||
term_font="${term_font/*family:}"
|
||||
term_font="${term_font/$'\n'*}"
|
||||
term_font="${term_font/\#*}"
|
||||
|
|
Loading…
Reference in a new issue