mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
print logo in ffPrintAndSaveCachedValue
This commit is contained in:
@@ -305,6 +305,7 @@ bool ffPrintCachedValue(FFinstance* instance, const char* key)
|
||||
|
||||
void ffPrintAndSaveCachedValue(FFinstance* instance, const char* key, FFstrbuf* value)
|
||||
{
|
||||
ffPrintLogoAndKey(instance, key);
|
||||
ffStrbufWriteTo(value, stdout);
|
||||
putchar('\n');
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ void ffPrintCPU(FFinstance* instance)
|
||||
|
||||
int numProcs = get_nprocs();
|
||||
|
||||
ffPrintLogoAndKey(instance, "CPU");
|
||||
|
||||
FF_STRBUF_CREATE(cpu);
|
||||
|
||||
if(ffStrbufIsEmpty(&instance->config.cpuFormat))
|
||||
|
||||
+1
-3
@@ -11,8 +11,6 @@ static void handleGPU(FFinstance* instance, struct pci_access* pacc, struct pci_
|
||||
if(ffPrintCachedValue(instance, key))
|
||||
return;
|
||||
|
||||
FF_STRBUF_CREATE(gpu);
|
||||
|
||||
char vendor[512];
|
||||
ffpci_lookup_name(pacc, vendor, sizeof(vendor), PCI_LOOKUP_VENDOR, dev->vendor_id, dev->device_id);
|
||||
|
||||
@@ -25,7 +23,7 @@ static void handleGPU(FFinstance* instance, struct pci_access* pacc, struct pci_
|
||||
char name[512];
|
||||
ffpci_lookup_name(pacc, name, sizeof(name), PCI_LOOKUP_DEVICE, dev->vendor_id, dev->device_id);
|
||||
|
||||
ffPrintLogoAndKey(instance, "GPU");
|
||||
FF_STRBUF_CREATE(gpu);
|
||||
|
||||
if(ffStrbufIsEmpty(&instance->config.gpuFormat))
|
||||
{
|
||||
|
||||
@@ -20,8 +20,6 @@ void ffPrintHost(FFinstance* instance)
|
||||
return;
|
||||
}
|
||||
|
||||
ffPrintLogoAndKey(instance, "Host");
|
||||
|
||||
FF_STRBUF_CREATE(host);
|
||||
|
||||
if(!ffStrbufIsEmpty(&instance->config.hostFormat))
|
||||
|
||||
@@ -39,8 +39,6 @@ void ffPrintLocale(FFinstance* instance)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
ffPrintLogoAndKey(instance, "Locale");
|
||||
|
||||
FF_STRBUF_CREATE(locale);
|
||||
|
||||
if(ffStrbufIsEmpty(&instance->config.localeFormat))
|
||||
|
||||
@@ -13,8 +13,6 @@ void ffPrintOS(FFinstance* instance)
|
||||
return;
|
||||
}
|
||||
|
||||
ffPrintLogoAndKey(instance, "OS");
|
||||
|
||||
FF_STRBUF_CREATE(os);
|
||||
|
||||
if(!ffStrbufIsEmpty(&instance->config.osFormat))
|
||||
|
||||
@@ -74,8 +74,6 @@ void ffPrintResolution(FFinstance* instance)
|
||||
|
||||
dlclose(x11);
|
||||
|
||||
ffPrintLogoAndKey(instance, "Resolution");
|
||||
|
||||
FF_STRBUF_CREATE(resolution);
|
||||
|
||||
if(!ffStrbufIsEmpty(&instance->config.resolutionFormat))
|
||||
|
||||
@@ -27,8 +27,6 @@ void ffPrintShell(FFinstance* instance)
|
||||
++shellName;
|
||||
}
|
||||
|
||||
ffPrintLogoAndKey(instance, "Shell");
|
||||
|
||||
FF_STRBUF_CREATE(shell);
|
||||
|
||||
if(!ffStrbufIsEmpty(&instance->config.shellFormat))
|
||||
|
||||
Reference in New Issue
Block a user