From cc39539c55c612ca8cfcd313cc8ccb84d89b0f82 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:10:22 +0800 Subject: [PATCH] Better kitty terminal font detection (#1795) * Better kitty terminal font detection * Fix indent --- neofetch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 315f4c7a..c7f4860e 100755 --- a/neofetch +++ b/neofetch @@ -3428,11 +3428,9 @@ END ;; "kitty"*) - kitty_config="$(kitty --debug-config)" - [[ "$kitty_config" != *font_family* ]] && return - - term_font="$(awk '/^font_family|^font_size/ {$1="";gsub("^ *","",$0);print $0}' \ - <<< "$kitty_config")" + term_font="from kitty.cli import *; o = create_default_opts(); \ + print(f'{o.font_family} {o.font_size}')" + term_font="$(kitty +runpy ''"$term_font"'')" ;; "konsole" | "yakuake")