From 1fa9324ca9aea3aec7b7fa7ede97106341ab80c9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 17 May 2016 18:53:47 +1000 Subject: [PATCH] termfont: iTerm2 support --- neofetch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 48f35a7c..c283004f 100755 --- a/neofetch +++ b/neofetch @@ -1790,12 +1790,17 @@ gettermfont () { termfont="$(awk -F '= ' '!/^($|#)/ && /font/ {printf $2; exit}' "${XDG_CONFIG_HOME}/termite/config")" ;; + # This only works on a global basis right now. + # We need to figure out a way to get the current + # profile in use. "terminator") - # This only works on a global basis right now. - # We need to figure out a way to get the current - # profile in use. termfont="$(awk -F '= ' '!/^($|#)/ && /font/ {printf $2; exit}' "${XDG_CONFIG_HOME}/terminator/config")" ;; + + "iTerm2") + termfile="$(/usr/libexec/plistbuddy -c Print ~/Library/Preferences/com.googlecode.iterm2.plist)" + termfont="$(awk -F '= ' '/Normal Font/ {printf $2; exit}' <<< "$termfile")" + ;; esac }