From b25e8c27211373087f0e3fcba86553a39805d066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 24 May 2024 09:18:48 +0800 Subject: [PATCH] Fastfetch: list available presets in exe path For better winget support --- src/fastfetch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fastfetch.c b/src/fastfetch.c index d8da34041..bdaf281db 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -265,6 +265,11 @@ static void listAvailablePresets(bool pretty) ffStrbufAppendS(path, "fastfetch/presets/"); ffListFilesRecursively(path->chars, pretty); } + + FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateCopy(&instance.state.platform.exePath); + ffStrbufSubstrBeforeLastC(&absolutePath, '/'); + ffStrbufAppendS(&absolutePath, "/presets/"); + ffListFilesRecursively(absolutePath.chars, pretty); } static void listAvailableLogos(void)