Skip to content

Commit cdda65e

Browse files
authored
Merge pull request #1673 from fastfetch-cli/dev
Release: v2.40.3
2 parents b68e0ce + a7ac898 commit cdda65e

File tree

4 files changed

+34
-29
lines changed

4 files changed

+34
-29
lines changed

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 2.40.3
2+
3+
Bugfixes:
4+
* Fix loading example configs from presets directory (#1672)
5+
* Regression of v2.40.2
6+
* Mark kitty image protocol support for warp terminal on macOS too (Logo)
7+
18
# 2.40.2
29

310
Changes:

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.40.2
4+
VERSION 2.40.3
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"

Diff for: src/fastfetch.c

+20-27
Original file line numberDiff line numberDiff line change
@@ -466,38 +466,31 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
466466

467467
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
468468

469-
if (!ffStrbufContainC(&absolutePath, '/')
470-
#ifdef _WIN32
471-
&& !ffStrbufContainC(&absolutePath, '\\')
472-
#endif
473-
)
469+
//Try to load as a relative path
470+
471+
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
474472
{
475-
//Try to load as a relative path
473+
ffStrbufSet(&absolutePath, path);
474+
ffStrbufAppendS(&absolutePath, "fastfetch/presets/");
475+
ffStrbufAppendS(&absolutePath, value);
476+
if (needExtension)
477+
ffStrbufAppendS(&absolutePath, ".jsonc");
476478

477-
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
478-
{
479-
ffStrbufSet(&absolutePath, path);
480-
ffStrbufAppendS(&absolutePath, "fastfetch/presets/");
481-
ffStrbufAppendS(&absolutePath, value);
482-
if (needExtension)
483-
ffStrbufAppendS(&absolutePath, ".jsonc");
479+
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
480+
}
484481

485-
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
486-
}
482+
//Try to load as a relative path with the directory of fastfetch binary
487483

488-
//Try to load as a relative path with the directory of fastfetch binary
484+
if (instance.state.platform.exePath.length)
485+
{
486+
ffStrbufSet(&absolutePath, &instance.state.platform.exePath);
487+
ffStrbufSubstrBeforeLastC(&absolutePath, '/');
488+
ffStrbufAppendS(&absolutePath, "/");
489+
ffStrbufAppendS(&absolutePath, value);
490+
if (needExtension)
491+
ffStrbufAppendS(&absolutePath, ".jsonc");
489492

490-
if (instance.state.platform.exePath.length)
491-
{
492-
ffStrbufSet(&absolutePath, &instance.state.platform.exePath);
493-
ffStrbufSubstrBeforeLastC(&absolutePath, '/');
494-
ffStrbufAppendS(&absolutePath, "/");
495-
ffStrbufAppendS(&absolutePath, value);
496-
if (needExtension)
497-
ffStrbufAppendS(&absolutePath, ".jsonc");
498-
499-
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
500-
}
493+
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
501494
}
502495

503496
//File not found

Diff for: src/logo/logo.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,12 @@ void ffLogoPrint(void)
627627
ffStrbufIgnCaseEqualS(&terminal->processName, "wezterm") ||
628628
ffStrbufIgnCaseEqualS(&terminal->processName, "wayst") ||
629629
ffStrbufIgnCaseEqualS(&terminal->processName, "ghostty") ||
630-
ffStrbufIgnCaseEqualS(&terminal->processName, "warp");
630+
#ifdef __APPLE__
631+
ffStrbufIgnCaseEqualS(&terminal->processName, "WarpTerminal") ||
632+
#else
633+
ffStrbufIgnCaseEqualS(&terminal->processName, "warp") ||
634+
#endif
635+
false;
631636

632637
//Try to load the logo as an image. If it succeeds, print it and return.
633638
if(logoPrintImageIfExists(supportsKitty ? FF_LOGO_TYPE_IMAGE_KITTY : FF_LOGO_TYPE_IMAGE_CHAFA, false))

0 commit comments

Comments
 (0)