[hb-info] Respect HB_CHAFA=0

This commit is contained in:
Behdad Esfahbod 2023-01-25 10:32:01 -07:00
parent 87df84c386
commit 167443e9fc
1 changed files with 3 additions and 1 deletions

View File

@ -1323,7 +1323,9 @@ struct info_t :
} }
#ifdef HAVE_CHAFA #ifdef HAVE_CHAFA
if (verbose && isatty (fileno (stdout))) char *chafa_env = getenv ("HB_CHAFA");
bool use_chafa = !chafa_env || atoi (chafa_env);
if (verbose && use_chafa && isatty (fileno (stdout)))
{ {
GString *chafa_str = _palette_chafa_str (i); GString *chafa_str = _palette_chafa_str (i);
printf ("%u %s %-23s %*s\n", i, type, name, printf ("%u %s %-23s %*s\n", i, type, name,