mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-08-27 20:36:32 -04:00
80 lines
1.5 KiB
Go
80 lines
1.5 KiB
Go
package main
|
|
|
|
import (
|
|
"os/exec"
|
|
|
|
"github.com/rwinkhart/go-boilerplate/front"
|
|
"github.com/rwinkhart/go-boilerplate/other"
|
|
)
|
|
|
|
func applications() {
|
|
for {
|
|
var doAll bool
|
|
choice := front.InputMenuGen("Application to install:", []string{"back", "all", "pamac-aur", "yay-bin (replaces paru)", "htop (replaces btop)", "neovim (replaces vi+vim+nano+micro)", "virt-manager (also installs qemu-desktop+libvirt)", "librewolf-bin", "zed", "steam"})
|
|
switch choice {
|
|
case 1:
|
|
return
|
|
case 2:
|
|
doAll = true
|
|
fallthrough
|
|
case 3:
|
|
managePackage("-S", "pamac-aur")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 4:
|
|
managePackage("-S", "yay-bin")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 5:
|
|
managePackage("-S", "htop")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 6:
|
|
managePackage("-S", "neovim")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 7:
|
|
cmd := exec.Command("pacman", "-S", "virt-manager", "qemu-desktop", "libvirt", "--noconfirm")
|
|
err := cmd.Run()
|
|
if err != nil {
|
|
other.PrintError("Failed to perform application installations for virt-manager", 1)
|
|
}
|
|
manageService("enable", "libvirtd.service")
|
|
manageService("start", "libvirtd.service")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 8:
|
|
managePackage("-S", "librewolf-bin")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 9:
|
|
managePackage("-S", "zed")
|
|
|
|
if !doAll {
|
|
break
|
|
}
|
|
fallthrough
|
|
case 10:
|
|
managePackage("-S", "steam")
|
|
}
|
|
}
|
|
}
|