Compare commits

..

7 Commits

Author SHA1 Message Date
李通洲 563f9598be Release: v2.40.4 2025-04-09 14:24:27 +08:00
Carter Li 03bc2dade9 Fastfetch: fix loading presets in {exePath}/presets
Regression of v2.40.0
2025-04-09 14:15:06 +08:00
Carter Li 09d683b706 WM (Linux): remove v from Hyprland version 2025-04-09 14:14:56 +08:00
Carter Li cdda65e6ad Merge pull request #1673 from fastfetch-cli/dev
Release: v2.40.3
2025-04-05 09:14:34 +08:00
Carter Li a7ac89818c Logo (Image): mark kitty image protocol support for warp terminal on macOS 2025-04-05 08:59:35 +08:00
李通洲 06956d2cf4 Release: v2.40.3 2025-04-05 08:42:24 +08:00
李通洲 ac52ea1afb Fastfetch: fix loading example configs from presets directory
Fix #1672
2025-04-05 08:42:24 +08:00
7 changed files with 50 additions and 44 deletions
+14
View File
@@ -1,3 +1,17 @@
# 2.40.4
Bugfixes:
* Fix loading presets config on Windows (Windows, #1682)
* Regression of v2.40.0
* Remove the prefix `v` of Hyprland version on Arch Linux (WM, Linux)
# 2.40.3
Bugfixes:
* Fix loading example configs from presets directory (#1672)
* Regression of v2.40.2
* Mark kitty image protocol support for warp terminal on macOS too (Logo)
# 2.40.2
Changes:
+1 -1
View File
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
project(fastfetch
VERSION 2.40.2
VERSION 2.40.4
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
+1
View File
@@ -38,6 +38,7 @@ static const char* getHyprland(FFstrbuf* result)
{
ffStrbufSubstrAfterFirstC(result, '"');
ffStrbufSubstrBeforeFirstC(result, '"');
ffStrbufTrimLeft(result, 'v');
FF_DEBUG("Extracted version from version.h: %s", result->chars);
return NULL;
}
+28 -26
View File
@@ -466,38 +466,40 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
if (!ffStrbufContainC(&absolutePath, '/')
#ifdef _WIN32
&& !ffStrbufContainC(&absolutePath, '\\')
#endif
)
//Try to load as a relative path
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
{
//Try to load as a relative path
ffStrbufSet(&absolutePath, path);
ffStrbufAppendS(&absolutePath, "fastfetch/presets/");
ffStrbufAppendS(&absolutePath, value);
if (needExtension)
ffStrbufAppendS(&absolutePath, ".jsonc");
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
{
ffStrbufSet(&absolutePath, path);
ffStrbufAppendS(&absolutePath, "fastfetch/presets/");
ffStrbufAppendS(&absolutePath, value);
if (needExtension)
ffStrbufAppendS(&absolutePath, ".jsonc");
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
}
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
}
//Try to load as a relative path with the directory of fastfetch binary
//Try to load as a relative path with the directory of fastfetch binary
if (instance.state.platform.exePath.length)
{
uint32_t lastSlash = ffStrbufLastIndexC(&instance.state.platform.exePath, '/') + 1;
assert(lastSlash < instance.state.platform.exePath.length);
if (instance.state.platform.exePath.length)
{
ffStrbufSet(&absolutePath, &instance.state.platform.exePath);
ffStrbufSubstrBeforeLastC(&absolutePath, '/');
ffStrbufAppendS(&absolutePath, "/");
ffStrbufAppendS(&absolutePath, value);
if (needExtension)
ffStrbufAppendS(&absolutePath, ".jsonc");
// Try {exePath}/
ffStrbufSetNS(&absolutePath, lastSlash, instance.state.platform.exePath.chars);
ffStrbufAppendS(&absolutePath, value);
if (needExtension)
ffStrbufAppendS(&absolutePath, ".jsonc");
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
}
// Try {exePath}/presets/
ffStrbufSubstrBefore(&absolutePath, lastSlash);
ffStrbufAppendS(&absolutePath, "presets/");
ffStrbufAppendS(&absolutePath, value);
if (needExtension)
ffStrbufAppendS(&absolutePath, ".jsonc");
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
}
//File not found
+6 -1
View File
@@ -627,7 +627,12 @@ void ffLogoPrint(void)
ffStrbufIgnCaseEqualS(&terminal->processName, "wezterm") ||
ffStrbufIgnCaseEqualS(&terminal->processName, "wayst") ||
ffStrbufIgnCaseEqualS(&terminal->processName, "ghostty") ||
ffStrbufIgnCaseEqualS(&terminal->processName, "warp");
#ifdef __APPLE__
ffStrbufIgnCaseEqualS(&terminal->processName, "WarpTerminal") ||
#else
ffStrbufIgnCaseEqualS(&terminal->processName, "warp") ||
#endif
false;
//Try to load the logo as an image. If it succeeds, print it and return.
if(logoPrintImageIfExists(supportsKitty ? FF_LOGO_TYPE_IMAGE_KITTY : FF_LOGO_TYPE_IMAGE_CHAFA, false))
-8
View File
@@ -172,14 +172,6 @@ static void getDataDirs(FFPlatform* platform)
#endif
ffPlatformPathAddAbsolute(&platform->dataDirs, FASTFETCH_TARGET_DIR_USR "/local/share/");
ffPlatformPathAddAbsolute(&platform->dataDirs, FASTFETCH_TARGET_DIR_USR "/share/");
if (platform->exePath.length > 0)
{
// Add ${currentExePath}
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateCopy(&platform->exePath);
ffStrbufSubstrBeforeLastC(&path, '/');
ffPlatformPathAddAbsolute(&platform->dataDirs, path.chars);
}
}
static void getUserName(FFPlatform* platform, const struct passwd* pwd)
-8
View File
@@ -129,14 +129,6 @@ static void getDataDirs(FFPlatform* platform)
platformPathAddKnownFolder(&platform->dataDirs, &FOLDERID_RoamingAppData);
platformPathAddKnownFolder(&platform->dataDirs, &FOLDERID_LocalAppData);
ffPlatformPathAddHome(&platform->dataDirs, platform, "");
if (platform->exePath.length > 0)
{
// Add ${currentExePath}
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateCopy(&platform->exePath);
ffStrbufSubstrBeforeLastC(&path, '/');
ffPlatformPathAddAbsolute(&platform->dataDirs, path.chars);
}
}
static void getUserName(FFPlatform* platform)