Skip to content

Commit 5b001d6

Browse files
authored
Merge pull request #1445 from fastfetch-cli/dev
Release: v2.32.0
2 parents 58a1d96 + 1b52029 commit 5b001d6

File tree

113 files changed

+3579
-2582
lines changed

Some content is hidden

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

113 files changed

+3579
-2582
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ jobs:
452452
version: '7.5'
453453
run: |
454454
uname -a
455-
sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa pulseaudio py3-requests
455+
sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa pulseaudio hwdata py3-requests
456456
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=ON .
457457
cmake --build . --target package --verbose -j4
458458
./fastfetch --list-features

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# 2.32.0
2+
3+
Bugfixes:
4+
* Fix `pci.ids` file location on OpenBSD (GPU, OpenBSD)
5+
* It's normally unused because enumerating PCI devices on OpenBSD requires root privileges
6+
* Fix bssid formatting (Wifi, Linux)
7+
* Fix Linux Lite distro detection (#1434, OS, Linux)
8+
* Suppress XE driver warnings from Mesa (#1435, OpenGL, Linux)
9+
* Fix format parameter name (#1443, Version)
10+
* Don't report useless information when Wifi is disabled (Wifi, FreeBSD)
11+
* Currently there are issues when the SSID contains whitespaces. More fixes are expected in the future.
12+
* Always use physical size reported by X11 server to avoid inconsistent results (#1444, Display, Linux)
13+
14+
Features:
15+
* Randomly select one if the logo source expands to multiple files (#1426, Logo)
16+
* Report mac product name when running Linux in MacBook (Host, Linux / FreeBSD)
17+
* Use screen size reported in DTD if make sense (Display)
18+
* Detect Virtualized Apple Silicon CPUs (CPU, Linux)
19+
* Add detection support for fvwm and ctwm (WM, OpenBSD / NetBSD)
20+
* Add Armbian-unofficial detection (OS, Linux)
21+
* Prefer surfaceless display when connect EGL (OpenGL)
22+
* Improve accuracy of WM detection on FreeBSD (WM, FreeBSD)
23+
* Add ratpoison window manager (WM, Linux)
24+
25+
Logo:
26+
* Update Linux Lite
27+
* Add Serpent OS
28+
* Add Ultramarine Small
29+
* Update Debian
30+
131
# 2.31.0
232

333
Bugfixes:

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
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.31.0
4+
VERSION 2.32.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -502,6 +502,7 @@ if(LINUX)
502502
src/detection/gpu/gpu_pci.c
503503
src/detection/gtk_qt/gtk.c
504504
src/detection/host/host_linux.c
505+
src/detection/host/host_mac.c
505506
src/detection/icons/icons_linux.c
506507
src/detection/initsystem/initsystem_linux.c
507508
src/detection/keyboard/keyboard_linux.c
@@ -649,6 +650,7 @@ elseif(FreeBSD)
649650
src/detection/gpu/gpu_pci.c
650651
src/detection/gtk_qt/gtk.c
651652
src/detection/host/host_bsd.c
653+
src/detection/host/host_mac.c
652654
src/detection/lm/lm_linux.c
653655
src/detection/icons/icons_linux.c
654656
src/detection/initsystem/initsystem_linux.c
@@ -881,6 +883,7 @@ elseif(APPLE)
881883
src/detection/gpu/gpu_apple.c
882884
src/detection/gpu/gpu_apple.m
883885
src/detection/host/host_apple.c
886+
src/detection/host/host_mac.c
884887
src/detection/icons/icons_nosupport.c
885888
src/detection/initsystem/initsystem_linux.c
886889
src/detection/keyboard/keyboard_apple.c
@@ -949,6 +952,7 @@ elseif(WIN32)
949952
src/detection/dns/dns_windows.c
950953
src/detection/font/font_windows.c
951954
src/detection/gpu/gpu_windows.c
955+
src/detection/host/host_mac.c
952956
src/detection/host/host_windows.c
953957
src/detection/icons/icons_windows.c
954958
src/detection/initsystem/initsystem_nosupport.c

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.31.0) jammy; urgency=medium
2+
3+
* Update to 2.31.0
4+
5+
-- Carter Li <[email protected]> Wed, 04 Dec 2024 08:41:40 +0800
6+
17
fastfetch (2.30.1) jammy; urgency=medium
28

39
* Update to 2.30.1

debian/files

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

doc/json_schema.json

Lines changed: 1601 additions & 438 deletions
Large diffs are not rendered by default.

scripts/gen-man.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Parsing is not case sensitive. E.g. \fB--logo-type\fR is
5555
equal to \fB--LOGO-TYPE\fR.
5656
57-
If a value is between square brakets, it is optional.
57+
If a value is between square brackets, it is optional.
5858
An optional boolean value defaults to true if not specified.
5959
6060
More detailed help messages for each options can be printed

src/common/format.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,5 @@ typedef struct FFformatarg
4242

4343
void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg);
4444
void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t numArgs, const FFformatarg* arguments);
45-
#define FF_PARSE_FORMAT_STRING_CHECKED(buffer, formatstr, numArgs, arguments) do {\
46-
static_assert(sizeof(arguments) / sizeof(*arguments) == (numArgs), "Invalid number of format arguments");\
47-
ffParseFormatString((buffer), (formatstr), (numArgs), (arguments));\
48-
} while (0)
45+
#define FF_PARSE_FORMAT_STRING_CHECKED(buffer, formatstr, arguments) \
46+
ffParseFormatString((buffer), (formatstr), sizeof(arguments) / sizeof(*arguments), (arguments));

src/common/io/io_unix.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "io.h"
22
#include "fastfetch.h"
33
#include "util/stringUtils.h"
4+
#include "common/time.h"
45

56
#include <fcntl.h>
67
#include <termios.h>
@@ -145,10 +146,10 @@ bool ffPathExpandEnv(FF_MAYBE_UNUSED const char* in, FF_MAYBE_UNUSED FFstrbuf* o
145146
if (wordexp(in, &exp, 0) != 0)
146147
return false;
147148

148-
if (exp.we_wordc == 1)
149+
if (exp.we_wordc >= 1)
149150
{
150151
result = true;
151-
ffStrbufSetS(out, exp.we_wordv[0]);
152+
ffStrbufSetS(out, exp.we_wordv[exp.we_wordc > 1 ? ffTimeGetNow() % exp.we_wordc : 0]);
152153
}
153154

154155
wordfree(&exp);
@@ -159,10 +160,10 @@ bool ffPathExpandEnv(FF_MAYBE_UNUSED const char* in, FF_MAYBE_UNUSED FFstrbuf* o
159160
if (glob(in, GLOB_NOSORT | GLOB_TILDE, NULL, &gb) != 0)
160161
return false;
161162

162-
if (gb.gl_matchc == 1)
163+
if (gb.gl_matchc >= 1)
163164
{
164165
result = true;
165-
ffStrbufSetS(out, gb.gl_pathv[0]);
166+
ffStrbufSetS(out, gb.gl_pathv[gb.gl_matchc > 1 ? ffTimeGetNow() % gb.gl_matchc : 0]);
166167
}
167168

168169
globfree(&gb);

src/common/option.h

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ struct yyjson_val;
66
struct yyjson_mut_doc;
77
struct yyjson_mut_val;
88

9+
typedef struct FFModuleFormatArg
10+
{
11+
const char* desc;
12+
const char* name;
13+
} FFModuleFormatArg;
14+
15+
typedef struct FFModuleFormatArgList
16+
{
17+
FFModuleFormatArg* args;
18+
uint32_t count;
19+
} FFModuleFormatArgList;
20+
21+
#define FF_FORMAT_ARG_LIST(list) { .args = list, .count = sizeof(list) / sizeof(FFModuleFormatArg) }
22+
923
// Must be the first field of FFModuleOptions
1024
typedef struct FFModuleBaseInfo
1125
{
@@ -19,32 +33,10 @@ typedef struct FFModuleBaseInfo
1933
void (*parseJsonObject)(void* options, struct yyjson_val *module);
2034
void (*printModule)(void* options);
2135
void (*generateJsonResult)(void* options, struct yyjson_mut_doc* doc, struct yyjson_mut_val* module);
22-
void (*printHelpFormat)(void);
2336
void (*generateJsonConfig)(void* options, struct yyjson_mut_doc* doc, struct yyjson_mut_val* obj);
37+
FFModuleFormatArgList formatArgs;
2438
} FFModuleBaseInfo;
2539

26-
static inline void ffOptionInitModuleBaseInfo(
27-
FFModuleBaseInfo* baseInfo,
28-
const char* name,
29-
const char* description,
30-
void* parseCommandOptions, // bool (*const parseCommandOptions)(void* options, const char* key, const char* value)
31-
void* parseJsonObject, // void (*const parseJsonObject)(void* options, yyjson_val *module)
32-
void* printModule, // void (*const printModule)(void* options)
33-
void* generateJsonResult, // void (*const generateJsonResult)(void* options, yyjson_mut_doc* doc, yyjson_mut_val* obj)
34-
void (*printHelpFormat)(void),
35-
void* generateJsonConfig // void (*const generateJsonConfig)(void* options, yyjson_mut_doc* doc, yyjson_mut_val* obj)
36-
)
37-
{
38-
baseInfo->name = name;
39-
baseInfo->description = description;
40-
baseInfo->parseCommandOptions = (__typeof__(baseInfo->parseCommandOptions)) parseCommandOptions;
41-
baseInfo->parseJsonObject = (__typeof__(baseInfo->parseJsonObject)) parseJsonObject;
42-
baseInfo->printModule = (__typeof__(baseInfo->printModule)) printModule;
43-
baseInfo->generateJsonResult = (__typeof__(baseInfo->generateJsonResult)) generateJsonResult;
44-
baseInfo->printHelpFormat = printHelpFormat;
45-
baseInfo->generateJsonConfig = (__typeof__(baseInfo->generateJsonConfig)) generateJsonConfig;
46-
}
47-
4840
typedef enum __attribute__((__packed__)) FFModuleKeyType
4941
{
5042
FF_MODULE_KEY_TYPE_NONE = 0,

0 commit comments

Comments
 (0)