mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-09-06 00:57:20 -04:00
Reduce removals list to only things that cannot be unchecked during installation
This commit is contained in:
+3
-13
@@ -10,32 +10,22 @@ import (
|
||||
func removals() {
|
||||
for {
|
||||
var doAll bool
|
||||
choice := front.InputMenuGen("Application to remove:", []string{"back", "all", "alacritty", "pavucontrol", "bash", "linux-cachyos-lts", "ufw", "modemmanager"})
|
||||
choice := front.InputMenuGen("Application to remove:", []string{"back", "all", "bash", "linux-cachyos-lts"})
|
||||
var target string
|
||||
switch choice {
|
||||
case 1:
|
||||
return
|
||||
case 2:
|
||||
cmd := exec.Command("pacman", "-Rcns", "back", "alacritty", "pavucontrol", "bash", "linux-cachyos-lts", "ufw", "modemmanager", "--noconfirm")
|
||||
cmd := exec.Command("pacman", "-Rcns", "bash", "linux-cachyos-lts", "--noconfirm")
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
other.PrintError("Failed to perform application removals", 1)
|
||||
}
|
||||
doAll = true
|
||||
case 3:
|
||||
target = "alacritty"
|
||||
case 4:
|
||||
target = "pavucontrol"
|
||||
case 5:
|
||||
target = "bash"
|
||||
case 6:
|
||||
case 4:
|
||||
target = "linux-cachyos-lts"
|
||||
case 7:
|
||||
target = "ufw"
|
||||
manageService("stop", "ufw.service")
|
||||
manageService("disable", "ufw.service")
|
||||
case 8:
|
||||
target = "modemmanager"
|
||||
}
|
||||
if !doAll {
|
||||
managePackage("-Rcns", target)
|
||||
|
||||
Reference in New Issue
Block a user