public async Task RunVSCode(Hotkey _, CancellationToken token) { if (await Utilities.ActivateProcess("CODE", token)) { return; } var startInfo = new ProcessStartInfo { CreateNoWindow = true, Arguments = "/c code .", FileName = Environment.ExpandEnvironmentVariables("%ComSpec%"), WorkingDirectory = Directory.GetCurrentDirectory() }; using var process = Process.Start(startInfo); Host.PlayNotificationSound(); }
public async Task RunWindowsTerminal(Hotkey _, CancellationToken token) { if (await Utilities.ActivateProcess("WINDOWSTERMINAL", token)) { return; } var currentFolder = Directory.GetCurrentDirectory(); var startInfo = new ProcessStartInfo { WindowStyle = ProcessWindowStyle.Maximized, Arguments = $"-d \"{currentFolder}\"", FileName = "wt.exe", WorkingDirectory = currentFolder }; using var process = Process.Start(startInfo); Host.PlayNotificationSound(); }