From c4aa55d5223a7c9fa4ce87bcd8db81da99fa15ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 12 Jan 2023 00:09:21 +0800 Subject: [PATCH] TerminalFont: support WezTerm on Windows --- src/detection/terminalfont/terminalfont.c | 2 +- src/detection/terminalshell/terminalshell_windows.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index b08e39565..9e9996304 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -356,7 +356,7 @@ static bool detectTerminalFontCommon(const FFinstance* instance, const FFTermina detectAlacritty(instance, terminalFont); else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "kitty") == 0) detectKitty(instance, terminalFont); - else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "wezterm-gui") == 0) + else if(ffStrbufStartsWithIgnCaseS(&terminalShell->terminalProcessName, "wezterm-gui")) detectWezterm(instance, terminalFont); else if(ffStrbufStartsWithIgnCaseS(&terminalShell->terminalExe, "/dev/tty")) detectTTY(terminalFont); diff --git a/src/detection/terminalshell/terminalshell_windows.cpp b/src/detection/terminalshell/terminalshell_windows.cpp index 8541f37f3..b800228fa 100644 --- a/src/detection/terminalshell/terminalshell_windows.cpp +++ b/src/detection/terminalshell/terminalshell_windows.cpp @@ -218,6 +218,8 @@ static uint32_t getTerminalInfo(const FFinstance* instance, FFTerminalShellResul ffStrbufSetS(&result->terminalPrettyName, "Windows Explorer"); else if(ffStrbufStartsWithIgnCaseS(&result->terminalPrettyName, "ConEmuC")) ffStrbufSetS(&result->terminalPrettyName, "ConEmu"); + else if(ffStrbufEqualS(&result->terminalPrettyName, "wezterm-gui")) + ffStrbufInitS(&result->terminalPrettyName, "WezTerm"); return ppid; }