diff --git a/src/fastfetch.c b/src/fastfetch.c index 9786c070a..118146d16 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -779,6 +779,19 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val return; } + { + //Try exe path + ffStrbufSet(&absolutePath, &instance.state.platform.exePath); + ffStrbufSubstrBeforeLastC(&absolutePath, '/'); + ffStrbufAppendS(&absolutePath, "/presets/"); + ffStrbufAppendS(&absolutePath, value); + + bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars); + + if(success) + return; + } + //File not found fprintf(stderr, "Error: couldn't find config: %s\n", value);