From 56cb1de185d1f39b0ab0e124329d7832c7dbeb13 Mon Sep 17 00:00:00 2001
From: Michael Straube <straubem@gmx.de>
Date: Mon, 9 Jan 2017 23:49:26 +0100
Subject: [PATCH] Term: Fix termite font detection, closes #608

---
 neofetch | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/neofetch b/neofetch
index 964ecdb4..0b239fde 100755
--- a/neofetch
+++ b/neofetch
@@ -1603,7 +1603,8 @@ get_term_font() {
         ;;
 
         "termite")
-            term_font="$(awk -F '= ' '/^font/ {a=$2} END{print a}' "${XDG_CONFIG_HOME}/termite/config")"
+            [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && config_file="${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" "$config_file")"
         ;;
 
         "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")