Skip to content

Commit 469e21c

Browse files
authored
Merge pull request #1813 from fastfetch-cli/dev
Release: v2.46.0
2 parents e0452d9 + 925e09c commit 469e21c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1344
-483
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,55 @@ jobs:
408408
name: fastfetch-musl-amd64
409409
path: ./fastfetch-*.*
410410

411-
macos-universal:
412-
name: macOS-universal
411+
macos-amd64:
412+
name: macOS-amd64
413+
runs-on: macos-13
414+
permissions:
415+
security-events: write
416+
contents: read
417+
steps:
418+
- name: checkout repository
419+
uses: actions/checkout@v4
420+
421+
- name: uname -a
422+
run: uname -a
423+
424+
- name: install required packages
425+
run: |
426+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --overwrite vulkan-loader vulkan-headers molten-vk imagemagick chafa
427+
428+
- name: configure project
429+
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
430+
431+
- name: build project
432+
run: cmake --build . --target package --verbose -j4
433+
434+
- name: list features
435+
run: ./fastfetch --list-features
436+
437+
- name: run fastfetch
438+
run: time ./fastfetch -c presets/ci.jsonc --stat false
439+
440+
- name: run fastfetch --format json
441+
run: time ./fastfetch -c presets/ci.jsonc --format json
442+
443+
- name: run flashfetch
444+
run: time ./flashfetch
445+
446+
- name: print dependencies
447+
run: otool -L fastfetch
448+
449+
- name: run tests
450+
run: ctest --output-on-failure
451+
452+
- name: upload artifacts
453+
uses: actions/upload-artifact@v4
454+
with:
455+
name: fastfetch-macos-amd64
456+
path: ./fastfetch-*.*
457+
458+
macos-aarch64:
459+
name: macOS-aarch64
413460
runs-on: macos-latest
414461
permissions:
415462
security-events: write
@@ -426,7 +473,7 @@ jobs:
426473
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --overwrite vulkan-loader vulkan-headers molten-vk imagemagick chafa
427474
428475
- name: configure project
429-
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' .
476+
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
430477

431478
- name: build project
432479
run: cmake --build . --target package --verbose -j4
@@ -452,7 +499,7 @@ jobs:
452499
- name: upload artifacts
453500
uses: actions/upload-artifact@v4
454501
with:
455-
name: fastfetch-macos-universal
502+
name: fastfetch-macos-aarch64
456503
path: ./fastfetch-*.*
457504

458505
sunos-amd64:
@@ -542,7 +589,7 @@ jobs:
542589
architecture: x86-64
543590
cpu_count: 4
544591
shell: bash
545-
version: '7.6'
592+
version: '7.7'
546593
run: |
547594
uname -a
548595
sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa
@@ -808,7 +855,8 @@ jobs:
808855
- linux-ppc64le
809856
- linux-s390x
810857
- musl-amd64
811-
- macos-universal
858+
- macos-amd64
859+
- macos-aarch64
812860
- freebsd-amd64
813861
- openbsd-amd64
814862
- netbsd-amd64

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
# 2.46.0
2+
3+
Features:
4+
* Support Rio terminal font detection (#1789, TerminalFont, Linux)
5+
* Support GPU detection by DRM on FreeBSD (GPU, FreeBSD)
6+
* Enable by `--gpu-detection-method auto`
7+
* Require proper DRM drivers installed and loaded
8+
* Support PowerPC CPU detection on NetBSD (#1802, CPU, NetBSD)
9+
* Support Aerospace WM detection (#1796, WM, macOS)
10+
* Improve Raspberry Pi OS for RPI5 detection (#1773, OS, Linux)
11+
* Support Linux Binary Compatibility detection on FreeBSD (#1786, Host, Linux)
12+
* Use `board-id` as board name if available (Board, macOS)
13+
* Intel only
14+
* 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)
16+
* Support GPU info detection for old ATI radeon driver (#1810, GPU, Linux)
17+
* Add macOS 26 Tahoe support (macOS)
18+
* Report macOS 26 code name (OS)
19+
* Report Liquid Glass DE on macOS 26+ (DE)
20+
* Detect Metal 4 support (GPU)
21+
22+
Bugfixes:
23+
* Fix packages counting by ignoring hidden folders (Packages, OpenBSD)
24+
* Fix Hyprland version detection (WM, FreeBSD)
25+
* Don't show `Please insert a disk into drive D:` error dialogs (#1805, Disk, Windows)
26+
* Hide `/boot/firmware` by default (Disk, Linux)
27+
28+
Logos:
29+
* Rename Hydra Framework to HydraPwk (#1812)
30+
* Add AnushOS (#1806)
31+
* Add HarmonyOS (#1804)
32+
* Add GhostFreak (#1801)
33+
* Add TrueNAS Scale (#1795)
34+
* Add Fedora2_small (#1785)
35+
* Add xenia_old; update colors of xenia (#1797)
36+
* Improve colors of bedrock_small (#1790)
37+
* Add Kalpa Desktop (#1807)
38+
139
# 2.45.0
240

341
Features:

CMakeLists.txt

Lines changed: 14 additions & 13 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.45.0
4+
VERSION 2.46.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -61,7 +61,7 @@ cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR FreeB
6161
cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
6262
cmake_dependent_option(ENABLE_XRANDR "Enable xrandr" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
6363
cmake_dependent_option(ENABLE_DRM "Enable libdrm" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
64-
cmake_dependent_option(ENABLE_DRM_AMDGPU "Enable libdrm_amdgpu" ON "LINUX" OFF)
64+
cmake_dependent_option(ENABLE_DRM_AMDGPU "Enable libdrm_amdgpu" ON "LINUX OR FreeBSD" OFF)
6565
cmake_dependent_option(ENABLE_GIO "Enable gio-2.0" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
6666
cmake_dependent_option(ENABLE_DCONF "Enable dconf" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
6767
cmake_dependent_option(ENABLE_DBUS "Enable dbus-1" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS OR Haiku" OFF)
@@ -529,6 +529,7 @@ if(LINUX)
529529
src/detection/displayserver/linux/xlib.c
530530
src/detection/font/font_linux.c
531531
src/detection/gpu/gpu_linux.c
532+
src/detection/gpu/gpu_drm.c
532533
src/detection/gpu/gpu_pci.c
533534
src/detection/gtk_qt/gtk.c
534535
src/detection/host/host_linux.c
@@ -676,6 +677,7 @@ elseif(FreeBSD)
676677
src/detection/displayserver/linux/xlib.c
677678
src/detection/font/font_linux.c
678679
src/detection/gpu/gpu_bsd.c
680+
src/detection/gpu/gpu_drm.c
679681
src/detection/gpu/gpu_pci.c
680682
src/detection/gtk_qt/gtk.c
681683
src/detection/host/host_bsd.c
@@ -1593,7 +1595,6 @@ elseif(WIN32)
15931595
PRIVATE "winbrand"
15941596
PRIVATE "propsys"
15951597
PRIVATE "secur32"
1596-
PRIVATE "pdh"
15971598
)
15981599
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
15991600
# WoA only works on Windows 10 or higher
@@ -1925,17 +1926,17 @@ install(
19251926
##################
19261927

19271928
set(CPACK_GENERATOR "TGZ;ZIP")
1929+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
1930+
set(CMAKE_SYSTEM_PROCESSOR "amd64")
1931+
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
1932+
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
1933+
endif()
19281934
if(APPLE)
1929-
string(TOLOWER "${CMAKE_PROJECT_NAME}-macos-universal" CPACK_PACKAGE_FILE_NAME)
1930-
else() # We don't use this in Windows
1931-
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
1932-
set(CMAKE_SYSTEM_PROCESSOR "amd64")
1933-
endif()
1934-
if(IS_MUSL)
1935-
string(TOLOWER "${CMAKE_PROJECT_NAME}-musl-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
1936-
else()
1937-
string(TOLOWER "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
1938-
endif()
1935+
string(TOLOWER "${CMAKE_PROJECT_NAME}-macos-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME) # use macos instead of darwin
1936+
elseif(IS_MUSL)
1937+
string(TOLOWER "${CMAKE_PROJECT_NAME}-musl-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
1938+
else()
1939+
string(TOLOWER "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
19391940
endif()
19401941

19411942
if(LINUX)

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.45.0) jammy; urgency=medium
2+
3+
* Update to 2.45.0
4+
5+
-- Carter Li <zhangsongcui@live.cn> Thu, 05 Jun 2025 10:56:38 +0800
6+
17
fastfetch (2.44.0) jammy; urgency=medium
28

39
* Update to 2.44.0

debian/files

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

doc/json_schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,6 +3002,11 @@
30023002
"const": "swap",
30033003
"description": "Print swap (paging file) space usage"
30043004
},
3005+
"separate": {
3006+
"type": "boolean",
3007+
"description": "Set if detailed swap devices should be reported on separate lines instead of a summary",
3008+
"default": false
3009+
},
30053010
"percent": {
30063011
"$ref": "#/$defs/percent"
30073012
},

presets/all.jsonc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
},
5353
"memory",
5454
"physicalmemory",
55-
"swap",
55+
{
56+
"type": "swap",
57+
"separate": true
58+
},
5659
"disk",
5760
"btrfs",
5861
"zpool",

presets/ci.jsonc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
},
5555
"memory",
5656
"physicalmemory",
57-
"swap",
57+
{
58+
"type": "swap",
59+
"separate": true
60+
},
5861
"disk",
5962
"btrfs",
6063
"zpool",

src/common/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ void ffStart(void)
105105
ffHideCursor = instance.config.display.hideCursor && !instance.config.display.pipe && !instance.state.resultDoc;
106106

107107
#ifdef _WIN32
108+
SetErrorMode(SEM_FAILCRITICALERRORS);
108109
if (instance.config.display.noBuffer)
109110
setvbuf(stdout, NULL, _IONBF, 0);
110111
else

src/common/io/io_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ bool ffSuppressIO(bool suppress)
290290

291291
void listFilesRecursively(uint32_t baseLength, FFstrbuf* folder, uint8_t indentation, const char* folderName, bool pretty)
292292
{
293-
FF_AUTO_CLOSE_FD int dfd = open(folder->chars, O_RDONLY);
293+
FF_AUTO_CLOSE_FD int dfd = open(folder->chars, O_RDONLY | O_CLOEXEC);
294294
if (dfd < 0)
295295
return;
296296

src/data/help.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,11 +1144,11 @@
11441144
"arg": {
11451145
"type": "enum",
11461146
"enum": {
1147-
"auto": "Query platform-specific graphics APIs. Requires proper GPU drivers to be installed. Not supported on BSDs",
1147+
"auto": "Query platform-specific graphics APIs. Requires proper GPU drivers to be installed. Supported on Linux, FreeBSD, Windows and macOS",
11481148
"pci": "Search PCI devices, which does not require GPU drivers to be installed. Not supported on Windows and macOS",
11491149
"vulkan": "Use Vulkan API. Slow and requires proper Vulkan drivers to be installed. Used for Android",
11501150
"opencl": "Use OpenCL API. Slow and requires proper OpenCL drivers to be installed",
1151-
"opengl": "Use OpenGL API. Slow and only detects one GPU"
1151+
"opengl": "Use OpenGL API. Slow and only detects one GPU. Used for OpenBSD"
11521152
},
11531153
"default": "auto"
11541154
}

src/detection/battery/battery_nbsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* results)
1818
{
19-
FF_AUTO_CLOSE_FD int fd = open(_PATH_SYSMON, O_RDONLY);
20-
if (fd < 0) return "open(_PATH_SYSMON, O_RDONLY) failed";
19+
FF_AUTO_CLOSE_FD int fd = open(_PATH_SYSMON, O_RDONLY | O_CLOEXEC);
20+
if (fd < 0) return "open(_PATH_SYSMON, O_RDONLY | O_CLOEXEC) failed";
2121

2222
prop_dictionary_t root = NULL;
2323
if (prop_dictionary_recv_ioctl(fd, ENVSYS_GETDICTIONARY, &root) < 0)

src/detection/battery/battery_obsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* result)
1010
{
11-
FF_AUTO_CLOSE_FD int devfd = open("/dev/apm", O_RDONLY);
11+
FF_AUTO_CLOSE_FD int devfd = open("/dev/apm", O_RDONLY | O_CLOEXEC);
1212

13-
if (devfd < 0) return "open(dev/apm, O_RDONLY) failed";
13+
if (devfd < 0) return "open(dev/apm, O_RDONLY | O_CLOEXEC) failed";
1414

1515
struct apm_power_info info = {};
1616

src/detection/board/board_apple.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ const char* ffDetectBoard(FFBoardResult* result)
99
if (!service)
1010
return "No IOPlatformExpertDevice found";
1111

12-
io_name_t name;
13-
if (IORegistryEntryGetName(service, name) == kIOReturnSuccess)
14-
ffStrbufSetS(&result->name, name);
12+
FF_CFTYPE_AUTO_RELEASE CFTypeRef boardId = IORegistryEntryCreateCFProperty(service, CFSTR("board-id"), kCFAllocatorDefault, kNilOptions);
13+
if (boardId)
14+
ffCfStrGetString(boardId, &result->name);
15+
else
16+
{
17+
io_name_t name;
18+
if (IORegistryEntryGetName(service, name) == kIOReturnSuccess)
19+
ffStrbufSetS(&result->name, name);
20+
}
21+
22+
FF_CFTYPE_AUTO_RELEASE CFStringRef version = IORegistryEntryCreateCFProperty(service, CFSTR("version"), kCFAllocatorDefault, kNilOptions);
23+
if (version)
24+
ffCfStrGetString(version, &result->version);
1525

1626
FF_CFTYPE_AUTO_RELEASE CFTypeRef manufacturer = IORegistryEntryCreateCFProperty(service, CFSTR("manufacturer"), kCFAllocatorDefault, kNilOptions);
1727
if (manufacturer)

src/detection/bootmgr/bootmgr_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
const char* ffDetectBootmgr(FFBootmgrResult* result)
2222
{
23-
FF_AUTO_CLOSE_FD int efifd = open("/dev/efi", O_RDWR);
23+
FF_AUTO_CLOSE_FD int efifd = open("/dev/efi", O_RDWR | O_CLOEXEC);
2424
if (efifd < 0) return "open(/dev/efi) failed";
2525

2626
uint8_t buffer[2048];

src/detection/brightness/brightness_obsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const char* ffDetectBrightness(FF_MAYBE_UNUSED FFBrightnessOptions* options, FFl
1212
for (char i = '0'; i <= '9'; ++i) {
1313
path[strlen("/dev/ttyC")] = i;
1414

15-
FF_AUTO_CLOSE_FD int devfd = open(path, O_RDONLY);
15+
FF_AUTO_CLOSE_FD int devfd = open(path, O_RDONLY | O_CLOEXEC);
1616

1717
if (devfd < 0) {
1818
if (errno == EACCES && i == '0')

src/detection/camera/camera_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const char* ffDetectCamera(FFlist* result)
2020
for (uint32_t i = 0; i <= 9; ++i)
2121
{
2222
path[ARRAY_SIZE(path) - 2] = (char) (i + '0');
23-
FF_AUTO_CLOSE_FD int fd = open(path, O_RDONLY);
23+
FF_AUTO_CLOSE_FD int fd = open(path, O_RDONLY | O_CLOEXEC);
2424
if (fd < 0)
2525
{
2626
if (errno == ENOENT)

src/detection/cpu/cpu_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ FF_MAYBE_UNUSED static const char* detectCPUX86(const FFCPUOptions* options, FFC
474474

475475
static const char* detectPhysicalCores(FFCPUResult* cpu)
476476
{
477-
int dfd = open("/sys/devices/system/cpu/", O_RDONLY | O_DIRECTORY);
477+
int dfd = open("/sys/devices/system/cpu/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
478478
if (dfd < 0) return "open(\"/sys/devices/system/cpu/\") failed";
479479

480480
FF_AUTO_CLOSE_DIR DIR* dir = fdopendir(dfd);

src/detection/cpu/cpu_nbsd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ static void freePropDict(prop_dictionary_t* pdict)
1818

1919
static const char* detectCpuTemp(double* current)
2020
{
21-
FF_AUTO_CLOSE_FD int fd = open(_PATH_SYSMON, O_RDONLY);
22-
if (fd < 0) return "open(_PATH_SYSMON, O_RDONLY) failed";
21+
FF_AUTO_CLOSE_FD int fd = open(_PATH_SYSMON, O_RDONLY | O_CLOEXEC);
22+
if (fd < 0) return "open(_PATH_SYSMON, O_RDONLY | O_CLOEXEC) failed";
2323

2424
__attribute__((__cleanup__(freePropDict))) prop_dictionary_t root = NULL;
2525
if (prop_dictionary_recv_ioctl(fd, ENVSYS_GETDICTIONARY, &root) < 0)
@@ -51,7 +51,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
5151
{
5252
if (ffSysctlGetString("machdep.cpu_brand", &cpu->name) != NULL &&
5353
ffSysctlGetString("machdep.dmi.processor-version", &cpu->name) != NULL &&
54-
ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL)
54+
ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL &&
55+
ffSysctlGetString("hw.model", &cpu->name) != NULL)
5556
{
5657
ffStrbufSetS(&cpu->name, "Unknown CPU");
5758
}

0 commit comments

Comments
 (0)