Skip to content

Commit e50421a

Browse files
authored
Merge pull request #2083 from fastfetch-cli/dev
Release: v2.56.0
2 parents 917f784 + 417b944 commit e50421a

Some content is hidden

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

50 files changed

+927
-392
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ jobs:
446446
usesh: true
447447
prepare: |
448448
uname -a
449-
pkg install pkg:/package/pkg
450449
pkg update --accept
451450
pkg install gcc14 cmake git pkg-config glib2 dbus sqlite-3 imagemagick
452451

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# 2.56.0
2+
3+
Features:
4+
* Enhances config file loading. `--config` and `-c` with relative path now also searches paths defined in `fastfetch --list-config-paths` (typically `~/.config/fastfetch/`)
5+
* This allows users to use `fastfetch -c my-config` without needing to specify the full path.
6+
* Adds NUMA node count detection (CPU)
7+
* Exposed via `{numa-nodes}` in custom format
8+
* Supported on Linux, FreeBSD and Windows
9+
* Supports the newest Alacritty config format (#2070, TerminalFont)
10+
* Detects driver specific info for Zhaoxin GPUs (GPU, Linux)
11+
* Detects Android OEM UI for certain OSes (DE, Android)
12+
* Improves users detection on Linux (#2064, Users, Linux)
13+
* Adds systemd fallback when utmp is unavailable
14+
* Fixes resource leaks
15+
* Always reports the newest session info
16+
* Adds kiss package manager support (#2072, Packages, Linux)
17+
* Reports `sshd` if `$SSH_TTY` is not available (Terminal)
18+
* Zpool module rewrite (#2051, Zpool)
19+
* Adds new Zpool properties: allocated, guid, readOnly
20+
* Zpool module now uses runtime lookup for properties to ensure portability
21+
* Adds NetBSD (requires `sudo`) and macOS support
22+
* Adds `splitLines` option for Command module, which splits the output into sub modules, each containing one line of the output (Command)
23+
```
24+
* Command output:
25+
Line 1
26+
Line 2
27+
Line 3
28+
29+
* Old behavior:
30+
Command: Line 1
31+
Line 2
32+
Line 3
33+
34+
* With `"splitLines": true`:
35+
Command 1: Line 1
36+
Command 2: Line 2
37+
Command 3: Line 3
38+
```
39+
40+
Bugfixes:
41+
* Fixes {m,o}ksh version detection on Linux (Shell)
42+
* Fixes Alacritty config parsing for TOML format (#2070, TerminalFont)
43+
* Improves builtin logo printing for piping and buffering (#2065, Logo)
44+
* Uses absolute path when detecting shell and terminal version if available (#2067, TerminalShell)
45+
46+
Logos:
47+
* Updates Codex Linux logo (#2071)
48+
* Adds OS/2 Warp logo (#2062)
49+
* Adds Amiga logo (#2061)
50+
151
# 2.55.1
252

353
Bugfixes:

CMakeLists.txt

Lines changed: 12 additions & 32 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.55.1
4+
VERSION 2.56.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -92,7 +92,6 @@ cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
9292
cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF)
9393
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly OR Haiku OR GNU" OFF)
9494
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
95-
cmake_dependent_option(ENABLE_LIBZFS "Enable libzfs" ON "LINUX OR FreeBSD OR SunOS" OFF)
9695
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "GNU" OFF)
9796

9897
option(ENABLE_ZLIB "Enable zlib" ON)
@@ -107,6 +106,7 @@ option(INSTALL_LICENSE "Install license into /usr/share/licenses" ON)
107106
option(ENABLE_EMBEDDED_PCIIDS "Embed pci.ids into fastfetch, requires `python`" OFF)
108107
option(ENABLE_EMBEDDED_AMDGPUIDS "Embed amdgpu.ids into fastfetch, requires `python`" OFF)
109108
option(ENABLE_WORDEXP "Enable using of wordexp(3) if available, instead of glob(3)" ON)
109+
option(ENABLE_LIBZFS "Enable libzfs" ON)
110110

111111
set(BINARY_LINK_TYPE_OPTIONS dlopen dynamic static)
112112
set(BINARY_LINK_TYPE dlopen CACHE STRING "How to link fastfetch")
@@ -410,6 +410,7 @@ set(LIBFASTFETCH_SRC
410410
src/detection/version/version.c
411411
src/detection/vulkan/vulkan.c
412412
src/detection/weather/weather.c
413+
src/detection/zpool/zpool.c
413414
src/logo/builtin.c
414415
src/logo/image/im6.c
415416
src/logo/image/im7.c
@@ -582,7 +583,6 @@ if(LINUX)
582583
src/detection/de/de_linux.c
583584
src/detection/wmtheme/wmtheme_linux.c
584585
src/detection/camera/camera_linux.c
585-
src/detection/zpool/zpool_linux.c
586586
src/util/platform/FFPlatform_unix.c
587587
src/util/binary_linux.c
588588
)
@@ -656,7 +656,6 @@ elseif(ANDROID)
656656
src/detection/de/de_linux.c
657657
src/detection/wmtheme/wmtheme_linux.c
658658
src/detection/camera/camera_android.c
659-
src/detection/zpool/zpool_nosupport.c
660659
src/util/platform/FFPlatform_unix.c
661660
src/util/binary_linux.c
662661
)
@@ -739,7 +738,6 @@ elseif(FreeBSD)
739738
src/detection/de/de_linux.c
740739
src/detection/wmtheme/wmtheme_linux.c
741740
src/detection/camera/camera_linux.c
742-
src/detection/zpool/zpool_linux.c
743741
src/util/platform/FFPlatform_unix.c
744742
src/util/binary_linux.c
745743
)
@@ -833,7 +831,6 @@ elseif(NetBSD)
833831
src/detection/de/de_linux.c
834832
src/detection/wmtheme/wmtheme_linux.c
835833
src/detection/camera/camera_linux.c
836-
src/detection/zpool/zpool_linux.c
837834
src/util/platform/FFPlatform_unix.c
838835
src/util/binary_linux.c
839836
)
@@ -916,7 +913,6 @@ elseif(OpenBSD)
916913
src/detection/de/de_linux.c
917914
src/detection/wmtheme/wmtheme_linux.c
918915
src/detection/camera/camera_linux.c
919-
src/detection/zpool/zpool_nosupport.c
920916
src/util/platform/FFPlatform_unix.c
921917
src/util/binary_linux.c
922918
src/util/smbiosHelper.c
@@ -986,7 +982,6 @@ elseif(APPLE)
986982
src/detection/de/de_nosupport.c
987983
src/detection/wmtheme/wmtheme_apple.m
988984
src/detection/camera/camera_apple.m
989-
src/detection/zpool/zpool_nosupport.c
990985
src/util/apple/cf_helpers.c
991986
src/util/apple/osascript.m
992987
src/util/apple/smc_temps.c
@@ -1056,7 +1051,6 @@ elseif(WIN32)
10561051
src/detection/de/de_nosupport.c
10571052
src/detection/wmtheme/wmtheme_windows.c
10581053
src/detection/camera/camera_windows.cpp
1059-
src/detection/zpool/zpool_nosupport.c
10601054
src/util/windows/getline.c
10611055
src/util/windows/com.cpp
10621056
src/util/windows/registry.c
@@ -1145,7 +1139,6 @@ elseif(SunOS)
11451139
src/detection/de/de_linux.c
11461140
src/detection/wmtheme/wmtheme_linux.c
11471141
src/detection/camera/camera_nosupport.c
1148-
src/detection/zpool/zpool_linux.c
11491142
src/util/platform/FFPlatform_unix.c
11501143
src/util/binary_linux.c
11511144
)
@@ -1214,7 +1207,6 @@ elseif(Haiku)
12141207
src/detection/de/de_nosupport.c
12151208
src/detection/wmtheme/wmtheme_nosupport.c
12161209
src/detection/camera/camera_nosupport.c
1217-
src/detection/zpool/zpool_nosupport.c
12181210
src/util/platform/FFPlatform_unix.c
12191211
src/util/binary_linux.c
12201212
src/util/haiku/version.cpp
@@ -1294,7 +1286,6 @@ elseif(GNU)
12941286
src/detection/de/de_linux.c
12951287
src/detection/wmtheme/wmtheme_linux.c
12961288
src/detection/camera/camera_nosupport.c
1297-
src/detection/zpool/zpool_nosupport.c
12981289
src/util/platform/FFPlatform_unix.c
12991290
src/util/binary_linux.c
13001291
)
@@ -1611,24 +1602,6 @@ ff_lib_enable(PCIACCESS
16111602
"pciaccess"
16121603
"pciaccess"
16131604
)
1614-
# The system <libzfs.h> is only usable on SunOS. We provide our local copy of it so it's always available.
1615-
if(ENABLE_LIBZFS)
1616-
if(BINARY_LINK_TYPE STREQUAL "dlopen")
1617-
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LIBZFS=1)
1618-
else()
1619-
set(CMAKE_REQUIRED_LIBRARIES_BACKUP ${CMAKE_REQUIRED_LIBRARIES})
1620-
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} zfs)
1621-
check_function_exists("libzfs_init" LIBZFS_FOUND)
1622-
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_BACKUP})
1623-
if(NOT LIBZFS_FOUND)
1624-
message(STATUS "Library: missing: LIBZFS")
1625-
else()
1626-
message(STATUS "Library: found LIBZFS")
1627-
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LIBZFS=1)
1628-
target_link_libraries(libfastfetch PRIVATE zfs)
1629-
endif()
1630-
endif()
1631-
endif()
16321605

16331606
if(ENABLE_THREADS)
16341607
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_THREADS=1)
@@ -1643,6 +1616,15 @@ endif()
16431616
if(ENABLE_EMBEDDED_AMDGPUIDS)
16441617
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_EMBEDDED_AMDGPUIDS=1)
16451618
endif()
1619+
if(ENABLE_LIBZFS)
1620+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LIBZFS=1)
1621+
1622+
if(NOT BINARY_LINK_TYPE STREQUAL "dlopen")
1623+
target_link_libraries(libfastfetch
1624+
PRIVATE "zfs"
1625+
)
1626+
endif()
1627+
endif()
16461628

16471629
if(LINUX)
16481630
target_link_libraries(libfastfetch
@@ -1733,8 +1715,6 @@ elseif(SunOS)
17331715
PRIVATE "socket"
17341716
PRIVATE "kstat"
17351717
PRIVATE "proc"
1736-
PRIVATE "zfs"
1737-
PRIVATE "nvpair"
17381718
PRIVATE "devinfo"
17391719
)
17401720
elseif(GNU)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Some distributions package outdated versions of fastfetch. Older versions receiv
3737
<img src="https://repology.org/badge/vertical-allrepos/fastfetch.svg?columns=2" alt="Packaging status" align="right">
3838
</a>
3939

40-
* Debian: `apt install fastfetch` (for Debian 13 or newer)
40+
* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (Ubuntu 22.04 or newer; latest version)
41+
* Debian / Ubuntu: `apt install fastfetch` (Debian 13 or newer; Ubuntu 25.04 or newer)
4142
* Debian / Ubuntu: Download `fastfetch-linux-<proper architecture>.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and double-click it (for Ubuntu 20.04 or newer and Debian 11 or newer).
4243
* Arch Linux: `pacman -S fastfetch`
4344
* Fedora: `dnf install fastfetch`

debian/changelog.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.55.1~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium
2+
3+
* Update to 2.55.1
4+
5+
-- Carter Li <zhangsongcui@live.cn> Mon, 17 Nov 2025 10:15:44 +0800
6+
17
fastfetch (2.55.0~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium
28

39
* Update to 2.55.0

doc/json_schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,11 @@
21112111
"type": "boolean",
21122112
"default": true
21132113
},
2114+
"splitLines": {
2115+
"description": "Set if the command output should be split into multiple lines",
2116+
"type": "boolean",
2117+
"default": false
2118+
},
21142119
"key": {
21152120
"$ref": "#/$defs/key"
21162121
},

src/common/font.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "fastfetch.h"
2+
#include "util/FFlist.h"
3+
#include "util/FFstrbuf.h"
24
#include "common/font.h"
35

46
#include <string.h>
@@ -192,6 +194,21 @@ void ffFontInitValues(FFfont* font, const char* name, const char* size)
192194
fontInitPretty(font);
193195
}
194196

197+
void ffFontInitMoveValues(FFfont* font, FFstrbuf* name, FFstrbuf* size, FFstrbuf* style)
198+
{
199+
ffFontInit(font);
200+
201+
if (name) ffStrbufInitMove(&font->name, name);
202+
if (size) ffStrbufInitMove(&font->size, size);
203+
if (style)
204+
{
205+
FFstrbuf* styleBuf = FF_LIST_ADD(FFstrbuf, font->styles);
206+
ffStrbufInitMove(styleBuf, style);
207+
}
208+
209+
fontInitPretty(font);
210+
}
211+
195212
void ffFontInitWithSpace(FFfont* font, const char* rawName)
196213
{
197214
const char* pspace = strrchr(rawName, ' ');

src/common/font.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void ffFontInit(FFfont* font);
1515
void ffFontInitQt(FFfont* font, const char* data);
1616
void ffFontInitPango(FFfont* font, const char* data);
1717
void ffFontInitValues(FFfont* font, const char* name, const char* size);
18+
void ffFontInitMoveValues(FFfont* font, FFstrbuf* name, FFstrbuf* size, FFstrbuf* style);
1819
void ffFontInitWithSpace(FFfont* font, const char* rawName);
1920
void ffFontDestroy(FFfont* font);
2021

src/common/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void defaultConfig(void)
4949

5050
void ffInitInstance(void)
5151
{
52-
#ifdef WIN32
52+
#ifdef _WIN32
5353
// https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?source=recommendat>
5454
setlocale(LC_ALL, ".UTF8");
5555
#else

src/common/io/io.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,19 +171,27 @@ static inline void ffUnsuppressIO(bool* suppressed)
171171

172172
void ffListFilesRecursively(const char* path, bool pretty);
173173

174+
static inline bool ffIsValidNativeFD(FFNativeFD fd)
175+
{
176+
#ifndef _WIN32
177+
return fd >= 0;
178+
#else
179+
// https://devblogs.microsoft.com/oldnewthing/20040302-00/?p=40443
180+
return fd != INVALID_HANDLE_VALUE && fd != NULL;
181+
#endif
182+
}
183+
174184
FF_C_NONNULL(1)
175185
static inline bool wrapClose(FFNativeFD* pfd)
176186
{
177187
assert(pfd);
178188

179-
#ifndef WIN32
180-
if (*pfd < 0)
181-
return false;
189+
if (!ffIsValidNativeFD(*pfd))
190+
return false;
191+
192+
#ifndef _WIN32
182193
close(*pfd);
183194
#else
184-
// https://devblogs.microsoft.com/oldnewthing/20040302-00/?p=40443
185-
if (*pfd == NULL || *pfd == INVALID_HANDLE_VALUE)
186-
return false;
187195
CloseHandle(*pfd);
188196
#endif
189197

0 commit comments

Comments
 (0)