Skip to content

Commit 8c227ae

Browse files
committed
TerminalFont (macOS): fix Ghostty termfont detection
`~/Library/Application Support/com.mitchellh.ghostty/config` is generated as an empty file if the settings dialog is opened Fix #1495
1 parent c5c2589 commit 8c227ae

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/detection/terminalfont/terminalfont.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,14 @@ static void detectGhostty(FFTerminalFontResult* terminalFont)
5858
{"font-size =", &fontSize},
5959
};
6060

61-
if (
62-
#if __APPLE__
63-
!ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml) &&
64-
#endif
65-
!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml)
66-
) {
67-
ffStrbufAppendS(&terminalFont->error, "Couldn't find file `ghostty/config`");
68-
return;
69-
}
61+
#if __APPLE__
62+
ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml);
63+
#endif
64+
65+
ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml);
7066

7167
if(fontName.length == 0)
72-
ffStrbufAppendS(&fontName, "JetBrains Mono");
68+
ffStrbufAppendS(&fontName, "JetBrainsMono Nerd Font");
7369

7470
if(fontSize.length == 0)
7571
ffStrbufAppendS(&fontSize, "13");

0 commit comments

Comments
 (0)