Only print non-ascii font if switch "use different font" is active
This commit is contained in:
parent
e2d1cb27a5
commit
3cf7c5ffa2
17
neofetch
17
neofetch
|
@ -1659,15 +1659,14 @@ get_term_font() {
|
||||||
# "Normal Font"
|
# "Normal Font"
|
||||||
term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)
|
term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)
|
||||||
# Font for non-ascii characters
|
# Font for non-ascii characters
|
||||||
# This font setting may differ from normal font, but this might be a false
|
# Only check for a different non-ascii font, if the user checked
|
||||||
# positive, as there is a setting to use a different font for non-ascii
|
# the "use a different font for non-ascii text" switch.
|
||||||
# characters and this setting does not get updated when flipping the switch.
|
local useDifferentFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)
|
||||||
# So it might be that the user checked the mark to use a different font,
|
if [[ "$useDifferentFont" == "true" ]]; then
|
||||||
# selected one, but then decided to uncheck the "use different font" mark
|
local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)
|
||||||
# again.
|
if [[ "$term_font" != "$nonAsciiFont" ]]; then
|
||||||
local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)
|
term_font="$term_font (normal) / $nonAsciiFont (non-ascii)"
|
||||||
if [[ "$term_font" != "$nonAsciiFont" ]]; then
|
fi
|
||||||
term_font="$term_font (normal) / $nonAsciiFont (non-ascii)"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Reference in New Issue