From 42a275b27bc4689d76d7c8f947478f776b351bd9 Mon Sep 17 00:00:00 2001 From: Bailey Kasin Date: Sat, 21 Oct 2023 23:18:37 -0700 Subject: [PATCH] [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 --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index ef9983b3..2639a249 100755 --- a/neofetch +++ b/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