mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
parent
761c649817
commit
494cc1493e
@ -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 <?target-file-path>`
|
||||
* 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)
|
||||
|
@ -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[]) {
|
||||
{"<property name=\"font-use-system\" type=\"bool\" value=\"", &useSysFont},
|
||||
{"<property name=\"font-name\" type=\"string\" value=\"", &fontName}
|
||||
});
|
||||
|
||||
if (configFound)
|
||||
{
|
||||
ffStrbufSubstrBeforeLastC(&useSysFont, '"');
|
||||
ffStrbufSubstrBeforeLastC(&fontName, '"');
|
||||
}
|
||||
else
|
||||
{
|
||||
path = "xfce4/terminal/terminalrc";
|
||||
configFound = ffParsePropFileConfigValues(path, 2, (FFpropquery[]) {
|
||||
{"FontUseSystem = ", &useSysFont},
|
||||
{"FontName = ", &fontName}
|
||||
});
|
||||
}
|
||||
|
||||
if (!configFound)
|
||||
ffStrbufSetStatic(&terminalFont->error, "Couldn't find xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml or xfce4/terminal/terminalrc");
|
||||
|
||||
if(useSysFont.length == 0 || ffStrbufIgnCaseCompS(&useSysFont, "false") == 0)
|
||||
{
|
||||
if(fontName.length == 0)
|
||||
ffStrbufAppendS(&terminalFont->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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user