diff --git a/CHANGELOG.md b/CHANGELOG.md index 07fbc962a..84ce4d940 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Features: * Support urxvt version detection (Terminal, Linux) * Support st version detection (Terminal, Linux) * Support st terminal font detection (TerminalFont, Linux) +* Support xfce4-terminal 1.1.0+ terminal font detection (TerminalFont, Linux) * Add option `--migrate-config ` * Support Nvidia GPU temp and cuda core count detection via nvml. Use `--gpu-use-nvml` to enable it (GPU) * Try supporting Wifi authentication type detection in macOS Sonoma. Please file a feature request if you get `to be supported (num)` with result of `/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep auth` (Wifi, macOS) diff --git a/src/detection/terminalfont/terminalfont_linux.c b/src/detection/terminalfont/terminalfont_linux.c index 71299af6a..36004ad1f 100644 --- a/src/detection/terminalfont/terminalfont_linux.c +++ b/src/detection/terminalfont/terminalfont_linux.c @@ -125,15 +125,33 @@ static void detectXFCETerminal(FFTerminalFontResult* terminalFont) FF_STRBUF_AUTO_DESTROY useSysFont = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate(); - ffParsePropFileConfigValues("xfce4/terminal/terminalrc", 2, (FFpropquery[]) { - {"FontUseSystem = ", &useSysFont}, - {"FontName = ", &fontName} + const char* path = "xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml"; + bool configFound = ffParsePropFileConfigValues(path, 2, (FFpropquery[]) { + {"error, "Couldn't find FontName in .config/xfce4/terminal/terminalrc"); + ffStrbufAppendF(&terminalFont->error, "Couldn't find FontName in %s", path); else ffFontInitPango(&terminalFont->font, fontName.chars); }