commit | 167443e9fc4f25b661ba7f17e7ea39691839297a | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Wed Jan 25 10:32:01 2023 -0700 |
committer | Behdad Esfahbod <behdad@behdad.org> | Wed Jan 25 11:37:07 2023 -0700 |
tree | 8faa613169c284c64eecd36b842493917c9525ef | |
parent | 87df84c386d2c03e8df75507b680b02044ee8cdd [diff] |
[hb-info] Respect HB_CHAFA=0
diff --git a/util/hb-info.cc b/util/hb-info.cc index 02b55c7..f7cc4e6 100644 --- a/util/hb-info.cc +++ b/util/hb-info.cc
@@ -1323,7 +1323,9 @@ } #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); printf ("%u %s %-23s %*s\n", i, type, name,