|
@@ -3186,32 +3186,32 @@ END
|
|
|
"$termite_config")"
|
|
|
;;
|
|
|
|
|
|
- "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
|
|
|
- xrdb="$(xrdb -query)"
|
|
|
- term_font="$(grep -im 1 -e "^${term/d}"'\**\.*font' -e '^\*font' <<< "$xrdb")"
|
|
|
- term_font="${term_font/*"*font:"}"
|
|
|
- term_font="${term_font/*".font:"}"
|
|
|
- term_font="${term_font/*"*.font:"}"
|
|
|
- term_font="$(trim "$term_font")"
|
|
|
+ urxvt|urxvtd|rxvt-unicode|xterm)
|
|
|
+ xrdb=$(xrdb -query)
|
|
|
+ term_font=$(grep -im 1 -e "^${term/d}"'\**\.*font:' -e '^\*font:' <<< "$xrdb")
|
|
|
+ term_font=${term_font/*"*font:"}
|
|
|
+ term_font=${term_font/*".font:"}
|
|
|
+ term_font=${term_font/*"*.font:"}
|
|
|
+ term_font=$(trim "$term_font")
|
|
|
|
|
|
- [[ -z "$term_font" && "$term" == "xterm" ]] && \
|
|
|
- term_font="$(grep '^XTerm.vt100.faceName' <<< "$xrdb")"
|
|
|
+ [[ -z $term_font && $term == xterm ]] && \
|
|
|
+ term_font=$(grep '^XTerm.vt100.faceName' <<< "$xrdb")
|
|
|
|
|
|
- term_font="$(trim "${term_font/*"faceName:"}")"
|
|
|
+ term_font=$(trim "${term_font/*"faceName:"}")
|
|
|
|
|
|
# xft: isn't required at the beginning so we prepend it if it's missing
|
|
|
- [[ "${term_font:0:1}" != "-" && "${term_font:0:4}" != "xft:" ]] && \
|
|
|
- term_font="xft:$term_font"
|
|
|
+ [[ ${term_font:0:1} != '-' && ${term_font:0:4} != xft: ]] && \
|
|
|
+ term_font=xft:$term_font
|
|
|
|
|
|
# Xresources has two different font formats, this checks which
|
|
|
# one is in use and formats it accordingly.
|
|
|
case $term_font in
|
|
|
- *"xft:"*)
|
|
|
- term_font="${term_font/xft:}"
|
|
|
- term_font="${term_font/:*}"
|
|
|
+ *xft:*)
|
|
|
+ term_font=${term_font/xft:}
|
|
|
+ term_font=${term_font/:*}
|
|
|
;;
|
|
|
|
|
|
- "-"*)
|
|
|
+ -*)
|
|
|
IFS=- read -r _ _ term_font _ <<< "$term_font"
|
|
|
;;
|
|
|
esac
|