1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-09-21 11:00:08 +00:00

Fix font-debugging script for alacritty

This commit is contained in:
Dominik Ritter 2018-10-09 20:05:38 +02:00 committed by Dominik Ritter
parent 933e95d31c
commit d83aacfb3f

View file

@ -118,13 +118,13 @@ get_term_font() {
case "$term" in case "$term" in
"alacritty"*) "alacritty"*)
shopt -s nullglob setopt nullglob
confs=({$XDG_CONFIG_HOME,$HOME}/{alacritty,}/{.,}alacritty.ym?) confs=({$XDG_CONFIG_HOME,$HOME}/{alacritty,}/{.,}alacritty.ym?)
shopt -u nullglob unsetopt nullglob
[[ -f "${confs[0]}" ]] || return [[ -f "${confs[1]}" ]] || return
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${confs[0]}")" term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${confs[1]}")"
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/\#*}"