term_font: Add more paths for Alacritty. Closes #911
This commit is contained in:
parent
023e3ee891
commit
56821a30e4
|
@ -24,4 +24,4 @@ script:
|
||||||
# The if statement is here to invert the exit code from grep.
|
# 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.
|
# grep normally errors if no match is found but we want the opposite.
|
||||||
# We invert it so grep fails if a match is found.
|
# 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
|
case "$term" in
|
||||||
"alacritty"*)
|
"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}' \
|
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' \
|
||||||
"${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
|
"$alacritty_file")"
|
||||||
term_font="${term_font/*family:}"
|
term_font="${term_font/*family:}"
|
||||||
term_font="${term_font/$'\n'*}"
|
term_font="${term_font/$'\n'*}"
|
||||||
term_font="${term_font/\#*}"
|
term_font="${term_font/\#*}"
|
||||||
|
|
Reference in New Issue