TerminalFont (macOS): fix ghostty font detection; default to JetBrains Mono

Ref: https://github.com/fastfetch-cli/fastfetch/issues/1466#issuecomment-2564379883
This commit is contained in:
Carter Li
2024-12-30 00:04:09 +08:00
parent 2a83b86ba4
commit 2ab2dd4d48
+7 -3
View File
@@ -58,14 +58,18 @@ static void detectGhostty(FFTerminalFontResult* terminalFont)
{"font-size =", &fontSize},
};
if (!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml))
{
if (
#if __APPLE__
!ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml) &&
#endif
!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml)
) {
ffStrbufAppendS(&terminalFont->error, "Couldn't find file `ghostty/config`");
return;
}
if(fontName.length == 0)
ffStrbufAppendS(&fontName, "monospace");
ffStrbufAppendS(&fontName, "JetBrains Mono");
if(fontSize.length == 0)
ffStrbufAppendS(&fontSize, "13");