From 576fcd7d3dd1d1523e5ab31fec9774fe3f747719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 20 Sep 2023 16:00:27 +0800 Subject: [PATCH] Display: print display type --- CHANGELOG.md | 1 + src/modules/display/display.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77dfce3cd..34d0388a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Features: * Support Apple Silicon CPU frequency detection (CPU, macOS) * Support user login time detection (Users) * Support winget package manager detection, guarded behind `--allow-slow-operations` (Packages, Windows) +* Print monitor type (built-in or external) (Display) Bugfixes: * Fix fastfetch hanging in specific environment (#561) diff --git a/src/modules/display/display.c b/src/modules/display/display.c index 14acbcca4..f623bc5f4 100644 --- a/src/modules/display/display.c +++ b/src/modules/display/display.c @@ -85,6 +85,9 @@ void ffPrintDisplay(FFDisplayOptions* options) result->scaledHeight > 0 && result->scaledHeight != result->height) printf(" (as %ix%i)", result->scaledWidth, result->scaledHeight); + if(result->type != FF_DISPLAY_TYPE_UNKNOWN) + fputs(result->type == FF_DISPLAY_TYPE_BUILTIN ? " [Built-in]" : " [External]", stdout); + if(moduleIndex > 0 && result->primary) printf(" *");