diff --git a/Program.cs b/Program.cs index 40d6c91..aa1597f 100644 --- a/Program.cs +++ b/Program.cs @@ -98,7 +98,19 @@ class Program static List InitializeKernelMenuItems() { var installedKernels = GetInstalledKernels(); - var availableCachyosKernels = GetAvailableCachyosKernels(); + var availableCachyosKernels = new List + { + "linux-cachyos-bmq", + "linux-cachyos-bore", + "linux-cachyos-deckify", + "linux-cachyos-eevdf", + "linux-cachyos-hardened", + "linux-cachyos-lts", + "linux-cachyos-rc", + "linux-cachyos-rt-bore", + "linux-cachyos-server", + "linux-cachyos" + }; var commonArchKernels = new List { @@ -173,44 +185,6 @@ class Program return installed; } - static string[] GetAvailableCachyosKernels() - { - var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = "pacman", - Arguments = "-Ss linux-cachyos", - RedirectStandardOutput = true, - UseShellExecute = false, - CreateNoWindow = true, - } - }; - - try - { - process.Start(); - string output = process.StandardOutput.ReadToEnd(); - process.WaitForExit(); - - if (process.ExitCode != 0) - { - return Array.Empty(); - } - - return output.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries) - .Where(line => !line.StartsWith(" ")) - .Select(line => line.Split('/')[1].Split(' ')[0]) - .Distinct() - .ToArray(); - } - catch (Exception ex) - { - Console.WriteLine($"Error searching for CachyOS kernels: {ex.Message}"); - return Array.Empty(); - } - } - static bool InstallKernel(string kernelName) { string headersPackageName = kernelName + "-headers";