mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
@@ -1,3 +1,13 @@
|
||||
# 2.19.1
|
||||
|
||||
Bugfixes
|
||||
* Fix frequency value printing when using custom format (#1111, CPU / GPU)
|
||||
* Fix display detection for XiaoMi Android phone (Display, Android)
|
||||
|
||||
Features:
|
||||
* Display if HDR mode is enabled for screens (Display)
|
||||
* Supported in Windows and Linux (KDE) correctly
|
||||
|
||||
# 2.19.0
|
||||
|
||||
Changes:
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
|
||||
|
||||
project(fastfetch
|
||||
VERSION 2.19.0
|
||||
VERSION 2.19.1
|
||||
LANGUAGES C
|
||||
DESCRIPTION "Fast neofetch-like system information tool"
|
||||
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
|
||||
|
||||
@@ -128,6 +128,8 @@ Alternatively, you can refer to the presets in [`presets` directory](https://git
|
||||
|
||||
The **correct** way to edit the configuration:
|
||||
|
||||
This is an example that [changes size prefix from MiB / GiB to MB / GB](https://github.com/fastfetch-cli/fastfetch/discussions/1014). Editor used: [helix](https://github.com/helix-editor/helix)
|
||||
|
||||
[](https://asciinema.org/a/1uF6sTPGKrHKI1MVaFcikINSQ)
|
||||
|
||||
### Q: I WANT THE DOCUMENTATION!
|
||||
|
||||
@@ -82,25 +82,25 @@ static bool detectWithGetprop(FFDisplayServerResult* ds)
|
||||
if (ffSettingsGetAndroidProperty("persist.sys.miui_resolution", &buffer) &&
|
||||
ffStrbufContainC(&buffer, ','))
|
||||
{
|
||||
// 1440,3200,560 => width,height,ppi
|
||||
// 1440,3200,560 => width,height,densityDpi
|
||||
uint32_t width = (uint32_t) ffStrbufToUInt(&buffer, 0);
|
||||
ffStrbufSubstrAfterFirstC(&buffer, ',');
|
||||
uint32_t height = (uint32_t) ffStrbufToUInt(&buffer, 0);
|
||||
ffStrbufSubstrAfterFirstC(&buffer, ',');
|
||||
uint32_t ppi = (uint32_t) ffStrbufToUInt(&buffer, 0);
|
||||
double scaleFactor = (double) ffStrbufToUInt(&buffer, 0) / 160.;
|
||||
return ffdsAppendDisplay(ds,
|
||||
width,
|
||||
height,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(uint32_t) (width / scaleFactor + .5),
|
||||
(uint32_t) (height / scaleFactor + .5),
|
||||
0,
|
||||
0,
|
||||
FF_DISPLAY_TYPE_BUILTIN,
|
||||
false,
|
||||
0,
|
||||
(uint32_t) (width / ppi * 25.4),
|
||||
(uint32_t) (height / ppi * 25.4)
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ void ffPrintCPU(FFCPUOptions* options)
|
||||
FF_STRBUF_AUTO_DESTROY freqBase = ffStrbufCreate();
|
||||
ffParseFrequency(cpu.frequencyBase, &freqBase);
|
||||
FF_STRBUF_AUTO_DESTROY freqMax = ffStrbufCreate();
|
||||
ffParseFrequency(cpu.frequencyBase, &freqBase);
|
||||
ffParseFrequency(cpu.frequencyBase, &freqMax);
|
||||
FF_STRBUF_AUTO_DESTROY freqBioslimit = ffStrbufCreate();
|
||||
ffParseFrequency(cpu.frequencyBiosLimit, &freqBioslimit);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define FF_DISPLAY_NUM_FORMAT_ARGS 13
|
||||
#define FF_DISPLAY_NUM_FORMAT_ARGS 16
|
||||
|
||||
static int sortByNameAsc(FFDisplayResult* a, FFDisplayResult* b)
|
||||
{
|
||||
@@ -126,6 +126,9 @@ void ffPrintDisplay(FFDisplayOptions* options)
|
||||
if(result->type != FF_DISPLAY_TYPE_UNKNOWN)
|
||||
ffStrbufAppendS(&buffer, result->type == FF_DISPLAY_TYPE_BUILTIN ? " [Built-in]" : " [External]");
|
||||
|
||||
if (result->hdrEnabled)
|
||||
ffStrbufAppendS(&buffer, " [HDR]");
|
||||
|
||||
if(moduleIndex > 0 && result->primary)
|
||||
ffStrbufAppendS(&buffer, " *");
|
||||
|
||||
@@ -150,6 +153,9 @@ void ffPrintDisplay(FFDisplayOptions* options)
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &result->physicalHeight, "physical-height"},
|
||||
{FF_FORMAT_ARG_TYPE_DOUBLE, &inch, "inch"},
|
||||
{FF_FORMAT_ARG_TYPE_DOUBLE, &ppi, "ppi"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT8, &result->bitDepth, "bit-depth"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &result->hdrEnabled, "hdr-enabled"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &result->wcgEnabled, "wcg-enabled"},
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -352,6 +358,9 @@ void ffPrintDisplayHelpFormat(void)
|
||||
"Screen physical height (in millimeters) - physical-height",
|
||||
"Physical diagonal length in inches - inch",
|
||||
"Pixels per inch (PPI) - ppi",
|
||||
"Bits per color channel - bit-depth",
|
||||
"True if high dynamic range (HDR) is enabled - hdr-enabled",
|
||||
"True if wide color gamut (WCG) is enabled - wcg-enabled",
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
|
||||
if (gpu->shared.total != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.total, &sTotal);
|
||||
if (gpu->shared.used != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.used, &sUsed);
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY frequency = ffStrbufCreate();
|
||||
ffParseFrequency(gpu->frequency, &frequency);
|
||||
|
||||
FF_PRINT_FORMAT_CHECKED(FF_GPU_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_GPU_NUM_FORMAT_ARGS, ((FFformatarg[]) {
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->vendor, "vendor"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->name, "name"},
|
||||
@@ -99,7 +102,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &sTotal, "shared-total"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &sUsed, "shared-used"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->platformApi, "platform-api"},
|
||||
{FF_FORMAT_ARG_TYPE_DOUBLE, &gpu->frequency, "frequency"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &frequency, "frequency"},
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,8 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key
|
||||
const char* subkey = key + strlen("--freq-");
|
||||
if(ffStrEqualsIgnCase(subkey, "ndigits"))
|
||||
options->freqNdigits = (int8_t) ffOptionParseInt32(key, value);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user