Robuster kitty font parsing

This commit is contained in:
Sibren Vasse 2019-02-07 23:48:09 +01:00
parent 789cdcea40
commit 6f423e3970

View file

@ -2912,10 +2912,7 @@ END
kitty_config="$(kitty --debug-config)"
[[ "$kitty_config" != *font_family* ]] && return
term_font_size="${kitty_config/*font_size}"
term_font_size="${term_font_size/$'\n'*}"
term_font="${kitty_config/*font_family}"
term_font="${term_font/$'\n'*} $term_font_size"
term_font="$(awk '/^font_family|^font_size/ {printf $2 " "}' <<< "$kitty_config")"
;;
"konsole" | "yakuake")