Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
665c7cd
Packaging: update debian stuff [ci skip]
CarterLi Jun 20, 2025
c13da56
OS (macOS): remove useless code
CarterLi Jun 20, 2025
55249c2
BIOS (SunOS): detect BIOS type
CarterLi Jun 21, 2025
a9f021c
Chore: remove useless semicolons
CarterLi Jun 21, 2025
ca04999
GPU (SunOS): rework GPU detection
CarterLi Jun 21, 2025
7a73211
Logo (Builtin): use FG_DEFAULT instead of FG_WHITE
CarterLi Jun 21, 2025
65ff11a
PhysicalDisk (SunOS): add support
CarterLi Jun 21, 2025
dbeb338
PhysicalDisk (SunOS): rework; support more device types
CarterLi Jun 22, 2025
8ebc980
GPU (SunOS): simplify
CarterLi Jun 22, 2025
92fe441
Shell (SunOS): ignore leading `-`
CarterLi Jun 22, 2025
13b7bc8
Sound (SunOS): rework; drop pulseaudio dependency
CarterLi Jun 22, 2025
049701a
CI (FreeBSD): run with 14.3
CarterLi Jun 23, 2025
ed18839
OS (Linux): detect DietPi
CarterLi Jun 23, 2025
8d59d14
OS (Linux): clean up dietpi related code
CarterLi Jun 23, 2025
29d7a1a
OS (Linux): use `ffStrbufSetStatic` where applicatable
CarterLi Jun 23, 2025
e68f766
OS (Linux): improve RPIOS detection
CarterLi Jun 23, 2025
45cbc6d
OS (macOS): force reporting 26 on macOS Tahoe
CarterLi Jun 25, 2025
863c558
GPU (OpenBSD): fix pci.ids file location
CarterLi Jun 25, 2025
addf674
OS (Linux): append version string for Ubuntu variants
CarterLi Jun 26, 2025
9832a0e
GPU (FreeBSD): fix compiling when libdrm is not available
CarterLi Jun 26, 2025
86e5a59
Display (FreeBSD): silence a compiler warning
CarterLi Jun 26, 2025
bdbc885
Logo (Builtin): `:%s/FG_WHITE/FG_DEFAULT/g`
CarterLi Jun 26, 2025
1da8367
Media (macOS): simplify now playing handling
CarterLi Jun 27, 2025
ad0ddfd
Media (macOS): support old macOS version
CarterLi Jun 27, 2025
974c658
README: add the OpenBSD and DragonFly installation method [ci skip]
CarterLi Jun 28, 2025
40e57b7
IO: increase `PROC_FILE_BUFFSIZ` to avoid possible short reads
CarterLi Jun 30, 2025
d94cdf4
CpuUsage (Linux / BSD): include interrupt and softirq times in CPU us…
CarterLi Jun 30, 2025
ec7f14a
CpuUsage (Windows): refine KernelTime calculation by removing unused …
CarterLi Jun 30, 2025
2406015
Terminal (Linux): ignore `init` and `systemd`
CarterLi Jun 30, 2025
1854953
Chore (Windows): move `perflib_.h` to somewhere global
CarterLi Jul 1, 2025
d5b56be
CMake (SunOS): drop pciaccess dependency
CarterLi Jul 1, 2025
4abb183
CPUUsage(Windows): add new method using Windows Performance Library
CarterLi Jul 1, 2025
0e61d11
CMake: fix typo
CarterLi Jul 1, 2025
18a6929
CPUUsage (Windows): disable `ENABLE_CPUUSAGE_PERFLIB` by default
CarterLi Jul 1, 2025
2e5769d
OS (Linux): add support of Xubuntu
CarterLi Jul 2, 2025
98738b6
CPUUsage (Windows): detect perflib support dynamically based on OS ve…
CarterLi Jul 2, 2025
74ae84e
Revert "Logo (Builtin): `:%s/FG_WHITE/FG_DEFAULT/g`"
CarterLi Jul 3, 2025
c574af9
Logo (Builtin): fix colors of DragonFly
CarterLi Jul 3, 2025
f1cc4a7
Logo (Builtin): fix colors of raw Linux logo
CarterLi Jul 3, 2025
8184731
Logo (Builtin): always use `FG_DEFAULT` on title and keys
CarterLi Jul 3, 2025
8c74c54
README
CarterLi Jul 3, 2025
3ed6acf
Release: v2.47.0
CarterLi Jul 3, 2025
dba0672
CMake: remove the unused option `ENABLE_CPUUSAGE_PERFLIB`
CarterLi Jul 3, 2025
fe5d739
Doc: update README [ci skip]
CarterLi Jul 3, 2025
8be6471
OS (Linux): remove duplicated code
CarterLi Jul 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ jobs:
architecture: x86-64
cpu_count: 4
shell: bash
version: '14.2'
version: '14.3'
run: |
uname -a
sudo pkg update
Expand Down
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# 2.47.0

Features:
* Various improvements for Solaris / OpenIndiana support
* Support BIOS (UEFI or legacy) type detection (BIOS)
* Support physical disk detection (PhysicalDisk)
* Remove leading `-` from login shells (Shell)
* Improve GPU detection performance (GPU)
* Drop `libpciaccess` dependency
* Use native API to detect sound devices (Sound)
* Drop `PulseAudio` dependency
* Improve DietPi OS and Raspberry Pi OS detection (#1816, OS, Linux)
* Force reporting version 26 on macOS Tahoe (OS, macOS)
* Append version string to Ubuntu variants (OS, Linux)
* Improve performance of media detection for macOS 15.4+ (Media, macOS)
* Increase `PROC_FILE_BUFFSIZ` to avoid possible short reads (Linux)
* Fix potential bugs in `DiskIO`, `NetIO` and `CPUUsage` modules
* Improve accuracy of CPU usage calculations by including interrupt and softirq times (CPUUsage, Linux / *BSD)
* Ignore `init` and `systemd` processes when detecting terminals (Terminal, Linux)
* Improve accuracy of CPU usage detection on Windows 10+ with perflib, which matches values reported by Task Manager (CPUUsage, Windows)

Bugfixes:
* Fix `pci.ids` file location (#1819, GPU, OpenBSD)
* Fix compiling on FreeBSD when `libdrm` support is disabled (#1820, GPU, FreeBSD)

Logos:
* Improve visibility on white-background terminals for some logos by replacing white with the default foreground color
* 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.
* Add Xubuntu

# 2.46.0

Features:
Expand All @@ -12,7 +42,7 @@ Features:
* Use `board-id` as board name if available (Board, macOS)
* Intel only
* Support shared VRAM usage detection for AMD GPUs (GPU, Linux)
* Use `perflib.h` instead of `pdh.h` for CPU temperature querying to get rid of pdh.dll (#1787, CPU, Windows)
* Use `perflib.h` instead of `pdh.h` for CPU temperature querying to get rid of `pdh.dll` dependency (#1787, CPU, Windows)
* Support GPU info detection for old ATI radeon driver (#1810, GPU, Linux)
* Add macOS 26 Tahoe support (macOS)
* Report macOS 26 code name (OS)
Expand Down
16 changes: 6 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.46.0
VERSION 2.47.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -76,13 +76,13 @@ cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD O
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR ANDROID OR SunOS" OFF)
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS OR Haiku" OFF)
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR SunOS" OFF)
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly OR Haiku" OFF)
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
cmake_dependent_option(ENABLE_LIBZFS "Enable libzfs" ON "LINUX OR FreeBSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD" OFF)

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

if(APPLE)
# See src/detection/media/media_apple.m
fastfetch_load_text(src/data/nowPlaying.scptd DATATEXT_NOWPLAYING)
endif()

configure_file(src/fastfetch_config.h.in fastfetch_config.h @ONLY)
configure_file(src/fastfetch_datatext.h.in fastfetch_datatext.h @ONLY)
if(APPLE)
Expand Down Expand Up @@ -1062,7 +1057,7 @@ elseif(SunOS)
src/detection/bluetoothradio/bluetoothradio_nosupport.c
src/detection/disk/disk_sunos.c
src/detection/dns/dns_linux.c
src/detection/physicaldisk/physicaldisk_nosupport.c
src/detection/physicaldisk/physicaldisk_sunos.c
src/detection/physicalmemory/physicalmemory_linux.c
src/detection/diskio/diskio_sunos.c
src/detection/displayserver/linux/displayserver_linux.c
Expand Down Expand Up @@ -1102,7 +1097,7 @@ elseif(SunOS)
src/detection/poweradapter/poweradapter_nosupport.c
src/detection/processes/processes_linux.c
src/detection/gtk_qt/qt.c
src/detection/sound/sound_linux.c
src/detection/sound/sound_sunos.c
src/detection/swap/swap_sunos.c
src/detection/terminalfont/terminalfont_linux.c
src/detection/terminalshell/terminalshell_linux.c
Expand Down Expand Up @@ -1637,6 +1632,7 @@ elseif(SunOS)
PRIVATE "proc"
PRIVATE "zfs"
PRIVATE "nvpair"
PRIVATE "devinfo"
)
elseif(ANDROID)
CHECK_LIBRARY_EXISTS(-l:libandroid-wordexp.a wordexp "" HAVE_LIBANDROID_WORDEXP_STATIC)
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ If fastfetch is not packaged for your distribution or an outdated version is pac

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.

### FreeBSD
### BSD systems

* `pkg install fastfetch`

### NetBSD

* `pkgin in fastfetch`
* FreeBSD: `pkg install fastfetch`
* NetBSD: `pkgin in fastfetch`
* OpenBSD: `pkg_add fastfetch` (Snapshots only)
* DragonFly BSD: `pkg install fastfetch` (Snapshots only)

### Android (Termux)

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.46.0) jammy; urgency=medium

* Update to 2.46.0

-- Carter Li <zhangsongcui@live.cn> Fri, 20 Jun 2025 15:01:21 +0800

fastfetch (2.45.0) jammy; urgency=medium

* Update to 2.45.0
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.45.0_source.buildinfo universe/utils optional
fastfetch_2.46.0_source.buildinfo universe/utils optional
3 changes: 1 addition & 2 deletions src/common/io/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
#define FF_INVALID_FD (-1)
// procfs's file can be changed between read calls such as /proc/meminfo and /proc/uptime.
// one safe way to read correct data is reading the whole file in a single read syscall
// 8192 comes from procps-ng: https://gitlab.com/procps-ng/procps/-/blob/master/library/meminfo.c?ref_type=heads#L39
#define PROC_FILE_BUFFSIZ 8192
#define PROC_FILE_BUFFSIZ (32 * 1024)
#endif

static inline FFNativeFD FFUnixFD2NativeFD(int unixfd)
Expand Down
6 changes: 4 additions & 2 deletions src/common/processing_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons
psinfo_t proc;
if (ffReadFileData(filePath, sizeof(proc), &proc) == sizeof(proc))
{
ffStrbufSetS(exe, proc.pr_psargs);
ffStrbufSubstrBeforeFirstC(exe, ' ');
const char* args = proc.pr_psargs;
if (args[0] == '-') ++args;
const char* end = strchr(args, ' ');
ffStrbufSetNS(exe, end ? (uint32_t) (end - args) : (uint32_t) strlen(args), args);
}

if (exePath)
Expand Down
24 changes: 0 additions & 24 deletions src/data/nowPlaying.scptd

This file was deleted.

16 changes: 16 additions & 0 deletions src/detection/bios/bios_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION

#include <fcntl.h>
#include <unistd.h>

#elif __sun
#include <libdevinfo.h>
#include <sys/sunddi.h>
#endif

typedef struct FFSmbiosBios
Expand Down Expand Up @@ -59,6 +63,7 @@ typedef struct FFSmbiosBios
static_assert(offsetof(FFSmbiosBios, ExtendedBiosRomSize) == 0x18,
"FFSmbiosBios: Wrong struct alignment");


const char* ffDetectBios(FFBiosResult* bios)
{
const FFSmbiosHeaderTable* smbiosTable = ffGetSmbiosHeaderTable();
Expand Down Expand Up @@ -94,6 +99,17 @@ const char* ffDetectBios(FFBiosResult* bios)
default: break;
}
}
#elif __sun
di_node_t rootNode = di_init("/", DINFOPROP);
if (rootNode != DI_NODE_NIL)
{
char* efiVersion = NULL;
if (di_prop_lookup_strings(DDI_DEV_T_ANY, rootNode, "efi-version", &efiVersion) > 0)
ffStrbufSetStatic(&bios->type, "UEFI");
else
ffStrbufSetStatic(&bios->type, "BIOS");
}
di_fini(rootNode);
#elif __HAIKU__ || __OpenBSD__
// Currently SMBIOS detection is supported in legancy BIOS only
ffStrbufSetStatic(&bios->type, "BIOS");
Expand Down
2 changes: 1 addition & 1 deletion src/detection/cpu/cpu_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "util/smbiosHelper.h"

#include <windows.h>
#include "perflib_.h"
#include "util/windows/perflib_.h"
#include <wchar.h>

static inline void ffPerfCloseQueryHandle(HANDLE* phQuery)
Expand Down
9 changes: 9 additions & 0 deletions src/detection/cpuusage/cpuusage.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
#include <stdint.h>

static FFlist cpuTimes1;
static uint64_t startTime;

void ffPrepareCPUUsage(void)
{
assert(cpuTimes1.elementSize == 0);
ffListInit(&cpuTimes1, sizeof(FFCpuUsageInfo));
ffGetCpuUsageInfo(&cpuTimes1);
startTime = ffTimeGetNow();
}

const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
Expand All @@ -23,6 +25,12 @@ const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
if(error) return error;
ffTimeSleep(options->waitTime);
}
else
{
uint64_t elapsedTime = ffTimeGetNow() - startTime;
if (elapsedTime < options->waitTime)
ffTimeSleep(options->waitTime - (uint32_t)elapsedTime);
}

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

Expand Down Expand Up @@ -57,5 +65,6 @@ const char* ffGetCpuUsageResult(FFCPUUsageOptions* options, FFlist* result)
cpuTime1->inUseAll = cpuTime2->inUseAll;
cpuTime1->totalAll = cpuTime2->totalAll;
}
startTime = ffTimeGetNow();
return NULL;
}
4 changes: 2 additions & 2 deletions src/detection/cpuusage/cpuusage_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
for (uint32_t i = 0; i < coreCount; ++i)
{
uint64_t* cpTime = cpTimes[i];
uint64_t inUse = cpTime[CP_USER] + cpTime[CP_NICE] + cpTime[CP_SYS];
uint64_t total = inUse + cpTime[CP_INTR] + cpTime[CP_IDLE];
uint64_t inUse = cpTime[CP_USER] + cpTime[CP_NICE] + cpTime[CP_SYS] + cpTime[CP_INTR];
uint64_t total = inUse + cpTime[CP_IDLE];

FFCpuUsageInfo* info = (FFCpuUsageInfo*) ffListAdd(cpuTimes);
*info = (FFCpuUsageInfo) {
Expand Down
4 changes: 2 additions & 2 deletions src/detection/cpuusage/cpuusage_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
{
if(sscanf(start, "cpu%*d%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%*[^\n]\n", &user, &nice, &system, &idle, &iowait, &irq, &softirq) == 7)
{
uint64_t inUse = user + nice + system;
uint64_t total = inUse + idle + iowait + irq + softirq;
uint64_t inUse = user + nice + system + irq + softirq;
uint64_t total = inUse + idle + iowait;

FFCpuUsageInfo* info = (FFCpuUsageInfo*) ffListAdd(cpuTimes);
*info = (FFCpuUsageInfo) {
Expand Down
Loading
Loading