From 1948f0e4ffbd087f07c07948b27962cb6b895932 Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Tue, 25 Apr 2017 19:36:49 +0100 Subject: [PATCH] Fix termite font matching Each config parameter is allowed arbitrary whitespace before it. It took me a long time to work out why it was always returning the /etc/xdg/termite/config value! --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0ffba95b..83fa6718 100755 --- a/neofetch +++ b/neofetch @@ -1756,7 +1756,7 @@ get_term_font() { "termite") [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config" - term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")" + term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^\s*font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")" ;; "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")