From 16aedae843e5c424ea033dd52dc45a325b4085a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 5 Aug 2023 20:32:54 +0800 Subject: [PATCH] TerminalFont: detect `.kitty-wrapped` as `kitty` Fixes #510 --- src/detection/terminalfont/terminalfont.c | 2 +- src/detection/terminalshell/terminalshell_linux.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index 58320d223..ec7161d36 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -355,7 +355,7 @@ static bool detectTerminalFontCommon(const FFTerminalShellResult* terminalShell, #ifndef _WIN32 else if(ffStrbufStartsWithIgnCaseS(&terminalShell->terminalExe, "/dev/pts/")) ffStrbufAppendS(&terminalFont->error, "Terminal font detection is not supported on PTS"); - else if(ffStrbufIgnCaseEqualS(&terminalShell->terminalProcessName, "kitty")) + else if(ffStrbufIgnCaseEqualS(&terminalShell->shellPrettyName, "kitty")) detectKitty(terminalFont); else if(ffStrbufStartsWithIgnCaseS(&terminalShell->terminalExe, "/dev/tty")) detectTTY(terminalFont); diff --git a/src/detection/terminalshell/terminalshell_linux.c b/src/detection/terminalshell/terminalshell_linux.c index 497cbc88d..8684e0aca 100644 --- a/src/detection/terminalshell/terminalshell_linux.c +++ b/src/detection/terminalshell/terminalshell_linux.c @@ -369,6 +369,8 @@ const FFTerminalShellResult* ffDetectTerminalShell() ffStrbufInitStatic(&result.shellPrettyName, "nushell"); else if(ffStrbufIgnCaseEqualS(&result.shellProcessName, "python") && getenv("XONSH_VERSION")) ffStrbufInitStatic(&result.shellPrettyName, "xonsh"); + else if(ffStrbufEqualS(&result.shellProcessName, ".kitty-wrapped")) + ffStrbufInitStatic(&result.shellPrettyName, "kitty"); // #510 else { // https://github.com/fastfetch-cli/fastfetch/discussions/280#discussioncomment-3831734