Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: v2.34.1 #1509

Merged
merged 19 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
  • Loading branch information
CarterLi committed Jan 10, 2025
commit 8c227ae4b843c9d6a18aaafd8807daa7913e2532
16 changes: 6 additions & 10 deletions src/detection/terminalfont/terminalfont.c
Original file line number Diff line number Diff line change
@@ -58,18 +58,14 @@ static void detectGhostty(FFTerminalFontResult* terminalFont)
{"font-size =", &fontSize},
};

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 __APPLE__
ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml);
#endif

ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml);

if(fontName.length == 0)
ffStrbufAppendS(&fontName, "JetBrains Mono");
ffStrbufAppendS(&fontName, "JetBrainsMono Nerd Font");

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