From 560c2acb888ceb0e5ecbc39f3f382d5e5bfee605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 21 Sep 2023 16:17:23 +0800 Subject: [PATCH] Global: add `--module-key " "` as a magic case for hiding keys --- CHANGELOG.md | 1 + src/common/printing.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71d44430f..c3a0896e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Features: * Support winget package manager detection, guarded behind `--allow-slow-operations` (Packages, Windows) * Print monitor type (built-in or external) (Display) * Support full GPU detection in WSL (Linux, GPU) +* Add `--module-key " "` as a magic case for hiding keys Bugfixes: * Fix fastfetch hanging in specific environment (#561) diff --git a/src/common/printing.c b/src/common/printing.c index 16b6de8ef..0d8635f2f 100644 --- a/src/common/printing.c +++ b/src/common/printing.c @@ -10,6 +10,10 @@ void ffPrintLogoAndKey(const char* moduleName, uint8_t moduleIndex, const FFModu if(moduleName == NULL) return; + //This is used as a magic value for hiding keys + if(moduleArgs && ffStrbufEqualS(&moduleArgs->key, " ")) + return; + if(!instance.config.pipe) { fputs(FASTFETCH_TEXT_MODIFIER_RESET, stdout);