mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-03 11:44:18 +01:00
Global: review code
This commit is contained in:
@@ -93,11 +93,11 @@ static void detectWarpTerminal(FFTerminalFontResult* terminalFont)
|
||||
|
||||
void ffDetectTerminalFontPlatform(const FFTerminalResult* terminal, FFTerminalFontResult* terminalFont)
|
||||
{
|
||||
if(ffStrbufIgnCaseCompS(&terminal->processName, "iterm.app") == 0 ||
|
||||
if(ffStrbufIgnCaseEqualS(&terminal->processName, "iterm.app") ||
|
||||
ffStrbufStartsWithIgnCaseS(&terminal->processName, "iTermServer-"))
|
||||
detectIterm2(terminalFont);
|
||||
else if(ffStrbufIgnCaseCompS(&terminal->processName, "Apple_Terminal") == 0)
|
||||
else if(ffStrbufIgnCaseEqualS(&terminal->processName, "Apple_Terminal"))
|
||||
detectAppleTerminal(terminalFont);
|
||||
else if(ffStrbufIgnCaseCompS(&terminal->processName, "WarpTerminal") == 0)
|
||||
else if(ffStrbufIgnCaseEqualS(&terminal->processName, "WarpTerminal"))
|
||||
detectWarpTerminal(terminalFont);
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@ static void detectConEmu(FFTerminalFontResult* terminalFont)
|
||||
|
||||
void ffDetectTerminalFontPlatform(const FFTerminalResult* terminal, FFTerminalFontResult* terminalFont)
|
||||
{
|
||||
if(ffStrbufIgnCaseCompS(&terminal->processName, "mintty") == 0)
|
||||
if(ffStrbufIgnCaseEqualS(&terminal->processName, "mintty"))
|
||||
detectMintty(terminalFont);
|
||||
else if(ffStrbufIgnCaseCompS(&terminal->processName, "conhost.exe") == 0)
|
||||
else if(ffStrbufIgnCaseEqualS(&terminal->processName, "conhost.exe"))
|
||||
detectConhost(terminalFont);
|
||||
else if(ffStrbufStartsWithIgnCaseS(&terminal->processName, "ConEmu"))
|
||||
detectConEmu(terminalFont);
|
||||
|
||||
@@ -15,7 +15,6 @@ typedef struct FFShellResult
|
||||
|
||||
typedef struct FFTerminalResult
|
||||
{
|
||||
|
||||
FFstrbuf processName;
|
||||
FFstrbuf exe;
|
||||
FFstrbuf prettyName;
|
||||
|
||||
+4
-4
@@ -502,10 +502,10 @@ void ffLogoPrint(void)
|
||||
|
||||
//Terminal emulators that support kitty graphics protocol.
|
||||
bool supportsKitty =
|
||||
ffStrbufIgnCaseCompS(&terminal->processName, "kitty") == 0 ||
|
||||
ffStrbufIgnCaseCompS(&terminal->processName, "konsole") == 0 ||
|
||||
ffStrbufIgnCaseCompS(&terminal->processName, "wezterm") == 0 ||
|
||||
ffStrbufIgnCaseCompS(&terminal->processName, "wayst") == 0;
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "kitty") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "konsole") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "wezterm") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "wayst");
|
||||
|
||||
//Try to load the logo as an image. If it succeeds, print it and return.
|
||||
if(logoPrintImageIfExists(supportsKitty ? FF_LOGO_TYPE_IMAGE_KITTY : FF_LOGO_TYPE_IMAGE_CHAFA, false))
|
||||
|
||||
@@ -226,7 +226,7 @@ void ffPrintBatteryHelpFormat(void)
|
||||
"Battery temperature",
|
||||
"Battery cycle count",
|
||||
"Battery serial number",
|
||||
"Battery manufactorDate",
|
||||
"Battery manufactor date",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user