From 7ed11db606827beefcdc5de7e42f1826db3afe29 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 17 May 2016 20:46:32 +1000 Subject: [PATCH] termfont: iTerm2 profile aware font --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c283004f..7427abca 100755 --- a/neofetch +++ b/neofetch @@ -1799,7 +1799,8 @@ gettermfont () { "iTerm2") termfile="$(/usr/libexec/plistbuddy -c Print ~/Library/Preferences/com.googlecode.iterm2.plist)" - termfont="$(awk -F '= ' '/Normal Font/ {printf $2; exit}' <<< "$termfile")" + termfont="$(awk -v pattern="Name = $ITERM_PROFILE" -F '= ' '$0 ~ pattern {printf $2 " "} /Normal Font/ {printf $2 " "}' <<< "$termfile")" + termfont=${termfont/ $ITERM_PROFILE*} ;; esac }