[F] Use correct awk logic for toml vs yml
I have no idea how, but I had the awk logic reversed. Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
This commit is contained in:
parent
d267aaa90c
commit
42a275b27b
1 changed files with 4 additions and 4 deletions
8
neofetch
8
neofetch
|
@ -4435,12 +4435,12 @@ get_term_font() {
|
|||
shopt -u nullglob
|
||||
|
||||
if [[ -f "${confs_toml[0]}" ]]; then
|
||||
term_font="$(awk '/normal:/ {while (!/family:/ || /#/)
|
||||
{if (!getline) {exit}} print; exit}' "${confs_toml[0]}")"
|
||||
elif [[ -f "${confs_yaml[0]}" ]]; then
|
||||
term_font="$(awk -F' *= *' '/^\[.*\]$/{section=substr($0, 2, length-2)}
|
||||
section == "font.normal" && $1 == "family"{sub(/^"/,"", $2);
|
||||
sub(/"$/, "", $2); print $2}' "${confs_yaml[0]}")"
|
||||
sub(/"$/, "", $2); print $2}' "${confs_toml[0]}")"
|
||||
elif [[ -f "${confs_yaml[0]}" ]]; then
|
||||
term_font="$(awk '/normal:/ {while (!/family:/ || /#/)
|
||||
{if (!getline) {exit}} print; exit}' "${confs_yaml[0]}")"
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue