terminal font [kitty]: Use kitty command instead of parsing config files. Closes #1150
This commit is contained in:
parent
679aa306fb
commit
a450fc88c5
1 changed files with 5 additions and 15 deletions
20
neofetch
20
neofetch
|
@ -2880,21 +2880,11 @@ END
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"kitty"*)
|
"kitty"*)
|
||||||
shopt -s nullglob
|
kitty_config="$(kitty --debug-config)"
|
||||||
confs=({$KITTY_CONFIG_DIRECTORY,$XDG_CONFIG_HOME,~/Library/Preferences}/kitty/kitty.con?)
|
term_font_size="${kitty_config/*font_size}"
|
||||||
shopt -u nullglob
|
term_font_size="${term_font_size/$'\n'*}"
|
||||||
|
term_font="${kitty_config/*font_family}"
|
||||||
[[ -f "${confs[0]}" ]] || return
|
term_font="${term_font/$'\n'*} $term_font_size"
|
||||||
|
|
||||||
term_font="$(awk '/^([[:space:]]*|[^#_])font_family[[:space:]]+/ {
|
|
||||||
$1 = "";
|
|
||||||
gsub(/^[[:space:]]/, "");
|
|
||||||
font = $0
|
|
||||||
}
|
|
||||||
/^([[:space:]]*|[^#_])font_size[[:space:]]+/ {
|
|
||||||
size = $2
|
|
||||||
}
|
|
||||||
END {print font,size}' "${confs[0]}")"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"konsole" | "yakuake")
|
"konsole" | "yakuake")
|
||||||
|
|
Loading…
Reference in a new issue