chimera linux support
This commit is contained in:
parent
287c2895fd
commit
0b80462453
BIN
logos/chimera.png
(Stored with Git LFS)
Normal file
BIN
logos/chimera.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -46,6 +46,8 @@ func GetLogo(id string) string {
|
||||
return "logos/endevaouros.png"
|
||||
case strings.HasPrefix(id, "artix"):
|
||||
return "logos/artix.png"
|
||||
case strings.HasPrefix(id, "chimera"):
|
||||
return "logos/chimera.png"
|
||||
|
||||
default:
|
||||
return "logos/linux.png"
|
||||
|
||||
@ -20,6 +20,13 @@ func getPmPackages(packagerName string, packagerPath string) string {
|
||||
if packagerName == "pacman" {
|
||||
return strconv.Itoa(len(pkgs)-1) + " (pacman)"
|
||||
}
|
||||
if packagerName == "apk" {
|
||||
pkgs, err := os.ReadFile(packagerPath)
|
||||
if err != nil {
|
||||
return "error reading apk package list"
|
||||
}
|
||||
return strconv.Itoa(len(pkgs)) + " (apk)"
|
||||
}
|
||||
return strconv.Itoa(len(pkgs)) + " (" + packagerName + ")"
|
||||
}
|
||||
return ""
|
||||
@ -36,6 +43,7 @@ func GetPkgs() string {
|
||||
getPmPackages("emerge", "/var/lib/portage"),
|
||||
getPmPackages("nix-user", "~/.nix-profile/lib/nix/profiles/per-user"),
|
||||
getPmPackages("nix", "/nix/store"),
|
||||
getPmPackages("apk", "/lib/apk/db/installed"),
|
||||
}
|
||||
var pkgsList []string
|
||||
for _, p := range rawPkgs {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user