Skip to content

Commit 8b40a81

Browse files
authored
Merge pull request #1826 from fastfetch-cli/dev
Release: v2.47.0
2 parents 469e21c + 8be6471 commit 8b40a81

35 files changed

+1746
-433
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ jobs:
552552
architecture: x86-64
553553
cpu_count: 4
554554
shell: bash
555-
version: '14.2'
555+
version: '14.3'
556556
run: |
557557
uname -a
558558
sudo pkg update

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# 2.47.0
2+
3+
Features:
4+
* Various improvements for Solaris / OpenIndiana support
5+
* Support BIOS (UEFI or legacy) type detection (BIOS)
6+
* Support physical disk detection (PhysicalDisk)
7+
* Remove leading `-` from login shells (Shell)
8+
* Improve GPU detection performance (GPU)
9+
* Drop `libpciaccess` dependency
10+
* Use native API to detect sound devices (Sound)
11+
* Drop `PulseAudio` dependency
12+
* Improve DietPi OS and Raspberry Pi OS detection (#1816, OS, Linux)
13+
* Force reporting version 26 on macOS Tahoe (OS, macOS)
14+
* Append version string to Ubuntu variants (OS, Linux)
15+
* Improve performance of media detection for macOS 15.4+ (Media, macOS)
16+
* Increase `PROC_FILE_BUFFSIZ` to avoid possible short reads (Linux)
17+
* Fix potential bugs in `DiskIO`, `NetIO` and `CPUUsage` modules
18+
* Improve accuracy of CPU usage calculations by including interrupt and softirq times (CPUUsage, Linux / *BSD)
19+
* Ignore `init` and `systemd` processes when detecting terminals (Terminal, Linux)
20+
* Improve accuracy of CPU usage detection on Windows 10+ with perflib, which matches values reported by Task Manager (CPUUsage, Windows)
21+
22+
Bugfixes:
23+
* Fix `pci.ids` file location (#1819, GPU, OpenBSD)
24+
* Fix compiling on FreeBSD when `libdrm` support is disabled (#1820, GPU, FreeBSD)
25+
26+
Logos:
27+
* Improve visibility on white-background terminals for some logos by replacing white with the default foreground color
28+
* According to Wikipedia, the default foreground color is implementation-defined. It's usually black for white themes and white for dark themes. However, some terminals, notably Konsole with the default theme, use a different color, which may cause issues with some logos.
29+
* Add Xubuntu
30+
131
# 2.46.0
232

333
Features:
@@ -12,7 +42,7 @@ Features:
1242
* Use `board-id` as board name if available (Board, macOS)
1343
* Intel only
1444
* Support shared VRAM usage detection for AMD GPUs (GPU, Linux)
15-
* Use `perflib.h` instead of `pdh.h` for CPU temperature querying to get rid of pdh.dll (#1787, CPU, Windows)
45+
* Use `perflib.h` instead of `pdh.h` for CPU temperature querying to get rid of `pdh.dll` dependency (#1787, CPU, Windows)
1646
* Support GPU info detection for old ATI radeon driver (#1810, GPU, Linux)
1747
* Add macOS 26 Tahoe support (macOS)
1848
* Report macOS 26 code name (OS)

CMakeLists.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.46.0
4+
VERSION 2.47.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -76,13 +76,13 @@ cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD O
7676
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR ANDROID OR SunOS" OFF)
7777
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS OR Haiku" OFF)
7878
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
79-
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR SunOS" OFF)
79+
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX" OFF)
8080
cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
8181
cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
8282
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly OR Haiku" OFF)
8383
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
8484
cmake_dependent_option(ENABLE_LIBZFS "Enable libzfs" ON "LINUX OR FreeBSD OR SunOS" OFF)
85-
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD OR SunOS" OFF)
85+
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD" OFF)
8686

8787
option(ENABLE_SYSTEM_YYJSON "Use system provided (instead of fastfetch embedded) yyjson library" OFF)
8888
option(ENABLE_ASAN "Build fastfetch with ASAN (address sanitizer)" OFF)
@@ -326,11 +326,6 @@ endif()
326326
fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
327327
fastfetch_load_text(src/data/structure.txt DATATEXT_STRUCTURE)
328328

329-
if(APPLE)
330-
# See src/detection/media/media_apple.m
331-
fastfetch_load_text(src/data/nowPlaying.scptd DATATEXT_NOWPLAYING)
332-
endif()
333-
334329
configure_file(src/fastfetch_config.h.in fastfetch_config.h @ONLY)
335330
configure_file(src/fastfetch_datatext.h.in fastfetch_datatext.h @ONLY)
336331
if(APPLE)
@@ -1062,7 +1057,7 @@ elseif(SunOS)
10621057
src/detection/bluetoothradio/bluetoothradio_nosupport.c
10631058
src/detection/disk/disk_sunos.c
10641059
src/detection/dns/dns_linux.c
1065-
src/detection/physicaldisk/physicaldisk_nosupport.c
1060+
src/detection/physicaldisk/physicaldisk_sunos.c
10661061
src/detection/physicalmemory/physicalmemory_linux.c
10671062
src/detection/diskio/diskio_sunos.c
10681063
src/detection/displayserver/linux/displayserver_linux.c
@@ -1102,7 +1097,7 @@ elseif(SunOS)
11021097
src/detection/poweradapter/poweradapter_nosupport.c
11031098
src/detection/processes/processes_linux.c
11041099
src/detection/gtk_qt/qt.c
1105-
src/detection/sound/sound_linux.c
1100+
src/detection/sound/sound_sunos.c
11061101
src/detection/swap/swap_sunos.c
11071102
src/detection/terminalfont/terminalfont_linux.c
11081103
src/detection/terminalshell/terminalshell_linux.c
@@ -1637,6 +1632,7 @@ elseif(SunOS)
16371632
PRIVATE "proc"
16381633
PRIVATE "zfs"
16391634
PRIVATE "nvpair"
1635+
PRIVATE "devinfo"
16401636
)
16411637
elseif(ANDROID)
16421638
CHECK_LIBRARY_EXISTS(-l:libandroid-wordexp.a wordexp "" HAVE_LIBANDROID_WORDEXP_STATIC)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,12 @@ If fastfetch is not packaged for your distribution or an outdated version is pac
6969

7070
You may also download the program directly from [the GitHub releases page](https://github.com/fastfetch-cli/fastfetch/releases/latest) in the form of an archive file.
7171

72-
### FreeBSD
72+
### BSD systems
7373

74-
* `pkg install fastfetch`
75-
76-
### NetBSD
77-
78-
* `pkgin in fastfetch`
74+
* FreeBSD: `pkg install fastfetch`
75+
* NetBSD: `pkgin in fastfetch`
76+
* OpenBSD: `pkg_add fastfetch` (Snapshots only)
77+
* DragonFly BSD: `pkg install fastfetch` (Snapshots only)
7978

8079
### Android (Termux)
8180

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.46.0) jammy; urgency=medium
2+
3+
* Update to 2.46.0
4+
5+
-- Carter Li <[email protected]> Fri, 20 Jun 2025 15:01:21 +0800
6+
17
fastfetch (2.45.0) jammy; urgency=medium
28

39
* Update to 2.45.0

debian/files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.45.0_source.buildinfo universe/utils optional
1+
fastfetch_2.46.0_source.buildinfo universe/utils optional

src/common/io/io.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
#define FF_INVALID_FD (-1)
2020
// procfs's file can be changed between read calls such as /proc/meminfo and /proc/uptime.
2121
// one safe way to read correct data is reading the whole file in a single read syscall
22-
// 8192 comes from procps-ng: https://gitlab.com/procps-ng/procps/-/blob/master/library/meminfo.c?ref_type=heads#L39
23-
#define PROC_FILE_BUFFSIZ 8192
22+
#define PROC_FILE_BUFFSIZ (32 * 1024)
2423
#endif
2524

2625
static inline FFNativeFD FFUnixFD2NativeFD(int unixfd)

src/common/processing_linux.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons
279279
psinfo_t proc;
280280
if (ffReadFileData(filePath, sizeof(proc), &proc) == sizeof(proc))
281281
{
282-
ffStrbufSetS(exe, proc.pr_psargs);
283-
ffStrbufSubstrBeforeFirstC(exe, ' ');
282+
const char* args = proc.pr_psargs;
283+
if (args[0] == '-') ++args;
284+
const char* end = strchr(args, ' ');
285+
ffStrbufSetNS(exe, end ? (uint32_t) (end - args) : (uint32_t) strlen(args), args);
284286
}
285287

286288
if (exePath)

src/data/nowPlaying.scptd

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/detection/bios/bios_windows.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
3232

3333
#include <fcntl.h>
3434
#include <unistd.h>
35+
36+
#elif __sun
37+
#include <libdevinfo.h>
38+
#include <sys/sunddi.h>
3539
#endif
3640

3741
typedef struct FFSmbiosBios
@@ -59,6 +63,7 @@ typedef struct FFSmbiosBios
5963
static_assert(offsetof(FFSmbiosBios, ExtendedBiosRomSize) == 0x18,
6064
"FFSmbiosBios: Wrong struct alignment");
6165

66+
6267
const char* ffDetectBios(FFBiosResult* bios)
6368
{
6469
const FFSmbiosHeaderTable* smbiosTable = ffGetSmbiosHeaderTable();
@@ -94,6 +99,17 @@ const char* ffDetectBios(FFBiosResult* bios)
9499
default: break;
95100
}
96101
}
102+
#elif __sun
103+
di_node_t rootNode = di_init("/", DINFOPROP);
104+
if (rootNode != DI_NODE_NIL)
105+
{
106+
char* efiVersion = NULL;
107+
if (di_prop_lookup_strings(DDI_DEV_T_ANY, rootNode, "efi-version", &efiVersion) > 0)
108+
ffStrbufSetStatic(&bios->type, "UEFI");
109+
else
110+
ffStrbufSetStatic(&bios->type, "BIOS");
111+
}
112+
di_fini(rootNode);
97113
#elif __HAIKU__ || __OpenBSD__
98114
// Currently SMBIOS detection is supported in legancy BIOS only
99115
ffStrbufSetStatic(&bios->type, "BIOS");

src/detection/cpu/cpu_windows.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "util/smbiosHelper.h"
66

77
#include <windows.h>
8-
#include "perflib_.h"
8+
#include "util/windows/perflib_.h"
99
#include <wchar.h>
1010

1111
static inline void ffPerfCloseQueryHandle(HANDLE* phQuery)

src/detection/cpuusage/cpuusage.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#include <stdint.h>
66

77
static FFlist cpuTimes1;
8+
static uint64_t startTime;
89

910
void ffPrepareCPUUsage(void)
1011
{
1112
assert(cpuTimes1.elementSize == 0);
1213
ffListInit(&cpuTimes1, sizeof(FFCpuUsageInfo));
1314
ffGetCpuUsageInfo(&cpuTimes1);
15+
startTime = ffTimeGetNow();
1416
}
1517

1618
const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
@@ -23,6 +25,12 @@ const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
2325
if(error) return error;
2426
ffTimeSleep(options->waitTime);
2527
}
28+
else
29+
{
30+
uint64_t elapsedTime = ffTimeGetNow() - startTime;
31+
if (elapsedTime < options->waitTime)
32+
ffTimeSleep(options->waitTime - (uint32_t)elapsedTime);
33+
}
2634

2735
if(cpuTimes1.length == 0) return "No CPU cores found";
2836

@@ -57,5 +65,6 @@ const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
5765
cpuTime1->inUseAll = cpuTime2->inUseAll;
5866
cpuTime1->totalAll = cpuTime2->totalAll;
5967
}
68+
startTime = ffTimeGetNow();
6069
return NULL;
6170
}

src/detection/cpuusage/cpuusage_bsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
4242
for (uint32_t i = 0; i < coreCount; ++i)
4343
{
4444
uint64_t* cpTime = cpTimes[i];
45-
uint64_t inUse = cpTime[CP_USER] + cpTime[CP_NICE] + cpTime[CP_SYS];
46-
uint64_t total = inUse + cpTime[CP_INTR] + cpTime[CP_IDLE];
45+
uint64_t inUse = cpTime[CP_USER] + cpTime[CP_NICE] + cpTime[CP_SYS] + cpTime[CP_INTR];
46+
uint64_t total = inUse + cpTime[CP_IDLE];
4747

4848
FFCpuUsageInfo* info = (FFCpuUsageInfo*) ffListAdd(cpuTimes);
4949
*info = (FFCpuUsageInfo) {

src/detection/cpuusage/cpuusage_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
3131
{
3232
if(sscanf(start, "cpu%*d%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%*[^\n]\n", &user, &nice, &system, &idle, &iowait, &irq, &softirq) == 7)
3333
{
34-
uint64_t inUse = user + nice + system;
35-
uint64_t total = inUse + idle + iowait + irq + softirq;
34+
uint64_t inUse = user + nice + system + irq + softirq;
35+
uint64_t total = inUse + idle + iowait;
3636

3737
FFCpuUsageInfo* info = (FFCpuUsageInfo*) ffListAdd(cpuTimes);
3838
*info = (FFCpuUsageInfo) {

0 commit comments

Comments
 (0)