mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-19 22:11:57 +00:00
Fix parsing font for Kitty
This commit is contained in:
parent
4b9ccc33bf
commit
0081152c28
1 changed files with 6 additions and 14 deletions
|
@ -201,21 +201,13 @@ END
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"kitty"*)
|
"kitty"*)
|
||||||
shopt -s nullglob
|
kitty_config="$(kitty --debug-config)"
|
||||||
confs=({$KITTY_CONFIG_DIRECTORY,$XDG_CONFIG_HOME,~/Library/Preferences}/kitty/kitty.con?)
|
[[ "$kitty_config" != *font_family* ]] && return
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
[[ -f "${confs[0]}" ]] || return
|
term_font_size="${kitty_config/*font_size}"
|
||||||
|
term_font_size="${term_font_size/$'\n'*}"
|
||||||
term_font="$(awk '/^([[:space:]]*|[^#_])font_family[[:space:]]+/ {
|
term_font="${kitty_config/*font_family}"
|
||||||
$1 = "";
|
term_font="${term_font/$'\n'*} $term_font_size"
|
||||||
gsub(/^[[:space:]]/, "");
|
|
||||||
font = $0
|
|
||||||
}
|
|
||||||
/^([[:space:]]*|[^#_])font_size[[:space:]]+/ {
|
|
||||||
size = $2
|
|
||||||
}
|
|
||||||
END { print font " " size}' "${confs[0]}")"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"konsole"*)
|
"konsole"*)
|
||||||
|
|
Loading…
Reference in a new issue