diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a24230eb..852fccbd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1.0) # Threads::Threads -project(fastfetch) +project(fastfetch LANGUAGES C) option(BUILD_TESTS "Build test programs" OFF) diff --git a/README.md b/README.md index 9e30bfc82..5a2bf6e78 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ All categories not listed here should work without needing a specific implementa ##### Logos ``` -Arch, Artix, Debian, Fedora, Fedora old, Garuda, Gentoo, Manjaro, Mint, Pop!_OS, Ubuntu, Void +Arch, Artix, CentOS, Debian, Fedora, Fedora old, Garuda, Gentoo, Manjaro, Mint, Pop!_OS, Ubuntu, Void ``` > **_NOTE:_** Unknown/unsupported logos will be replaced with a question mark when running fastfetch. diff --git a/src/common/logo.c b/src/common/logo.c index feb1c0199..4eb22aa66 100644 --- a/src/common/logo.c +++ b/src/common/logo.c @@ -138,6 +138,41 @@ static FFlogo* getLogoCelOS() FF_LOGO_RETURN } +static FFlogo* getLogoCentOS() +{ + FF_LOGO_INIT + FF_LOGO_NAMES("centos", "centos-linux") + FF_LOGO_LINES( + "$1 .. \n" + "$1 .PLTJ. \n" + "$1 <><><><> \n" + "$2 KKSSV' 4KKK $1LJ$4 KKKL.'VSSKK \n" + "$2 KKV' 4KKKKK $1LJ$4 KKKKAL 'VKK \n" + "$2 V' ' 'VKKKK $1LJ$4 KKKKV' ' 'V \n" + "$2 .4MA.' 'VKK $1LJ$4 KKV' '.4Mb. \n" + "$4 . $2KKKKKA.' 'V $1LJ$4 V' '.4KKKKK $3. \n" + "$4 .4D $2KKKKKKKA.'' $1LJ$4 ''.4KKKKKKK $3FA. \n" + "$4\n" + "$4 'VD $3KKKKKKKK'.. $2LJ $1..'KKKKKKKK $3FV \n" + "$4 ' $3VKKKKK'. .4 $2LJ $1K. .'KKKKKV $3' \n" + "$3 'VK'. .4KK $2LJ $1KKA. .'KV' \n" + "$3 A. . .4KKKK $2LJ $1KKKKA. . .4 \n" + "$3 KKA. 'KKKKK $2LJ $1KKKKK' .4KK \n" + "$3 KKSSA. VKKK $2LJ $1KKKV .4SSKK \n" + "$2 <><><><> \n" + "$1 'MKKM' \n" + "$1 '' " + ) + FF_LOGO_COLORS( + "\033[33m", //yellow + "\033[32m", //green + "\033[34m", //blue + "\033[35m", //magenta + "\033[37m" //white + ) + FF_LOGO_RETURN +} + static FFlogo* getLogoDebian() { FF_LOGO_INIT @@ -456,6 +491,7 @@ static getLogoMethod* getLogoMethods() getLogoArch, getLogoArtix, getLogoCelOS, + getLogoCentOS, getLogoDebian, getLogoFedora, getLogoFedoraOld, @@ -742,4 +778,3 @@ void ffListLogos() } #endif - diff --git a/src/common/settings.c b/src/common/settings.c index 214360d0a..81565bd30 100644 --- a/src/common/settings.c +++ b/src/common/settings.c @@ -305,6 +305,7 @@ FFvariant ffSettingsGetXFConf(FFinstance* instance, const char* channelName, con #include #include #include +#include typedef struct LibrpmData { @@ -314,9 +315,13 @@ typedef struct LibrpmData FF_LIBRARY_DEFINE_SYMBOL_FIELD(rpmdbGetIteratorCount); FF_LIBRARY_DEFINE_SYMBOL_FIELD(rpmdbFreeIterator); FF_LIBRARY_DEFINE_SYMBOL_FIELD(rpmtsFree); + FF_LIBRARY_DEFINE_SYMBOL_FIELD(rpmlogSetMask); } LibrpmData; uint32_t getRpmPackageCount(LibrpmData* data) { + // Don't print any error messages + data->ffrpmlogSetMask(RPMLOG_MASK(RPMLOG_EMERG)); + uint32_t count = 0; rpmts ts = NULL; rpmdbMatchIterator mi = NULL; @@ -359,6 +364,7 @@ uint32_t ffSettingsGetRpmPackageCount(FFinstance* instance) FF_LIBRARY_LOAD_SYMBOL_TO_OBJECT(data, library, rpmdbGetIteratorCount, mutex, 0); FF_LIBRARY_LOAD_SYMBOL_TO_OBJECT(data, library, rpmdbFreeIterator, mutex, 0); FF_LIBRARY_LOAD_SYMBOL_TO_OBJECT(data, library, rpmtsFree, mutex, 0); + FF_LIBRARY_LOAD_SYMBOL_TO_OBJECT(data, library, rpmlogSetMask, mutex, 0); pthread_mutex_unlock(&mutex); return getRpmPackageCount(&data);