OpenSUSE icon tweak, Zypper support + APT readded

This commit is contained in:
PK 2021-03-19 16:52:51 -05:00
parent cc6cc72a2e
commit c17d7a5a9d

View file

@ -99,6 +99,7 @@ int pkgman() { // this is just a function that returns the total of installed pa
}; };
struct package_manager pkgmans[] = { struct package_manager pkgmans[] = {
{ "apt list --installed 2> /dev/null | wc -l", "(apt)" },
{ "apk info 2> /dev/null | wc -l", "(apk)" }, { "apk info 2> /dev/null | wc -l", "(apk)" },
{ "dnf list installed 2> /dev/null | wc -l", "(dnf)" }, { "dnf list installed 2> /dev/null | wc -l", "(dnf)" },
{ "qlist -I 2> /dev/null | wc -l", "(emerge)" }, { "qlist -I 2> /dev/null | wc -l", "(emerge)" },
@ -108,6 +109,7 @@ int pkgman() { // this is just a function that returns the total of installed pa
{ "pacman -Qq 2> /dev/null | wc -l", "(pacman)" }, { "pacman -Qq 2> /dev/null | wc -l", "(pacman)" },
{ "rpm -qa --last 2> /dev/null | wc -l", "(rpm)" }, { "rpm -qa --last 2> /dev/null | wc -l", "(rpm)" },
{ "xbps-query -l 2> /dev/null | wc -l", "(xbps)" } { "xbps-query -l 2> /dev/null | wc -l", "(xbps)" }
{ "zypper se --installed-only 2> /dev/null | wc -l", "(zypper)" }
}; };
const unsigned long pkgman_count = sizeof(pkgmans) / sizeof(pkgmans[0]); const unsigned long pkgman_count = sizeof(pkgmans) / sizeof(pkgmans[0]);
@ -335,13 +337,10 @@ void print_ascii() { // prints logo (as ascii art) of the given system. distribu
" %s | %s| %s---- %s|\n" " %s | %s| %s---- %s|\n"
" %s --%s'--------'\n\n",GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN); " %s --%s'--------'\n\n",GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN, WHITE, GREEN);
} else if (strcmp(version_name, "\"opensuse-leap\"") == 0) { } else if (strcmp(version_name, "\"opensuse-leap\"") == 0) {
printf("\033[2E\033[6C%s_______\n" printf("\033[3E\033[3C%s|\\----/|\n"
" ___| %s__%s \\\n" " _ / %sO O%s\\\n"
" / %s/ o\\%s|\n" " __. W /\n"
" %s\\__/%s|\n" " '----'\n\n\n", GREEN, WHITE, GREEN);
" ______/\n"
" \\_______\n"
" \\_________/\n\n", GREEN, NORMAL, GREEN, NORMAL, GREEN, NORMAL, GREEN);
} else if (strcmp(version_name, "pop") == 0) { } else if (strcmp(version_name, "pop") == 0) {
printf("\033[2E\033[6C%s|\\.-----./|\n" printf("\033[2E\033[6C%s|\\.-----./|\n"
" |/ \\|\n" " |/ \\|\n"