Skip to content

Commit 9d0797c

Browse files
authored
Merge pull request #1271 from fastfetch-cli/dev
Release: v2.25.0
2 parents e9bb761 + f804236 commit 9d0797c

Some content is hidden

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

43 files changed

+1642
-600
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# 2.25.0
2+
3+
Features:
4+
* Moore Threads GPU add support to query number of cores (#1259, GPU)
5+
* Cache detection result based on last modification time (Packages)
6+
* Add cmake options to disable certain package managers at compile time
7+
* Package managers are encouraged to disable some package managers by passing `-DPACKAGES_DISABLE_` when running `cmake`. For example, when building for Arch Linux, `-DPACKAGES_DISABLE_APK=ON -DPACKAGES_DISABLE_DPKG=ON -DPACKAGES_DISABLE_RPM=ON ...` should be specified.
8+
* See all available options by [running `cmake -L | grep PACKAGES_DISABLE_`](https://github.com/fastfetch-cli/fastfetch/blob/dev/CMakeLists.txt#L91)
9+
* This option does NOT remove the detection code. It just disables the detection at runtime. One can still use `--packages-disabled ""` to enable all package managers.
10+
* Add new option `--show-localip-{speed,mtu}` (LocalIP)
11+
* Add new module `Btrfs`, which prints all mounted Btrfs volumes, like `Zpool` module (#1262, Linux)
12+
* Improve Wifi module support for macOS Sequoia (Wifi, macOS)
13+
* Currently it uses `system_profiler` which costs about 2 seconds on my MBP. I suggest disabling it for now until a better solution is found.
14+
15+
Bugfixes:
16+
* Fix invalid CPU temperature detection on FreeBSD (#1260, CPU, FreeBSD)
17+
* Remove `showPeCoreCount` support on FreeBSD (#1260, CPU, FreeBSD)
18+
* Don't use Wifi speed as Ethernet speed (LocalIP, FreeBSD)
19+
* Fix compiling with old linux headers (Camera, Linux)
20+
* Fix detecting public ipv6 address (PublicIP, Windows)
21+
22+
Logo:
23+
* Fix parrot logo detection
24+
* Rename TorizonCore to Torizon OS
25+
126
# 2.24.0
227

328
Changes:

CMakeLists.txt

Lines changed: 37 additions & 15 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.24.0
4+
VERSION 2.25.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -88,6 +88,15 @@ if(NOT BINARY_LINK_TYPE IN_LIST BINARY_LINK_TYPE_OPTIONS)
8888
message(FATAL_ERROR "BINARY_LINK_TYPE must be one of ${BINARY_LINK_TYPE_OPTIONS}")
8989
endif()
9090

91+
set(PACKAGE_MANAGERS AM APK BREW CHOCO DPKG EMERGE EOPKG FLATPAK GUIX LINGLONG LPKG LPKGBUILD MACPORTS NIX OPKG PACMAN PALUDIS PKG PKGTOOL RPM SCOOP SNAP SORCERY WINGET XBPS)
92+
foreach(package_manager ${PACKAGE_MANAGERS})
93+
if(package_manager STREQUAL "WINGET")
94+
option(PACKAGES_DISABLE_${package_manager} "Disable ${package_manager} package manager detection by default" ON)
95+
else()
96+
option(PACKAGES_DISABLE_${package_manager} "Disable ${package_manager} package manager detection by default" OFF)
97+
endif()
98+
endforeach()
99+
91100
if (LINUX)
92101
set(CUSTOM_PCI_IDS_PATH "" CACHE STRING "Custom path to file pci.ids, defaults to `/usr/share/hwdata/pci.ids`")
93102
set(CUSTOM_AMDGPU_IDS_PATH "" CACHE STRING "Custom path to file amdgpu.ids, defaults to `/usr/share/libdrm/amdgpu.ids`")
@@ -333,6 +342,7 @@ set(LIBFASTFETCH_SRC
333342
src/modules/bootmgr/bootmgr.c
334343
src/modules/brightness/brightness.c
335344
src/modules/break/break.c
345+
src/modules/btrfs/btrfs.c
336346
src/modules/camera/camera.c
337347
src/modules/chassis/chassis.c
338348
src/modules/colors/colors.c
@@ -419,6 +429,7 @@ if(LINUX)
419429
src/detection/board/board_linux.c
420430
src/detection/bootmgr/bootmgr_linux.c
421431
src/detection/brightness/brightness_linux.c
432+
src/detection/btrfs/btrfs_linux.c
422433
src/detection/chassis/chassis_linux.c
423434
src/detection/cpu/cpu_linux.c
424435
src/detection/cpucache/cpucache_linux.c
@@ -499,6 +510,7 @@ elseif(ANDROID)
499510
src/detection/board/board_android.c
500511
src/detection/bootmgr/bootmgr_nosupport.c
501512
src/detection/brightness/brightness_nosupport.c
513+
src/detection/btrfs/btrfs_nosupport.c
502514
src/detection/chassis/chassis_nosupport.c
503515
src/detection/cpu/cpu_linux.c
504516
src/detection/cpucache/cpucache_linux.c
@@ -564,6 +576,7 @@ elseif(FreeBSD)
564576
src/detection/board/board_bsd.c
565577
src/detection/bootmgr/bootmgr_bsd.c
566578
src/detection/brightness/brightness_bsd.c
579+
src/detection/btrfs/btrfs_nosupport.c
567580
src/detection/chassis/chassis_bsd.c
568581
src/detection/cpu/cpu_bsd.c
569582
src/detection/cpucache/cpucache_shared.c
@@ -643,6 +656,7 @@ elseif(APPLE)
643656
src/detection/board/board_apple.c
644657
src/detection/bootmgr/bootmgr_apple.c
645658
src/detection/brightness/brightness_apple.c
659+
src/detection/btrfs/btrfs_nosupport.c
646660
src/detection/chassis/chassis_nosupport.c
647661
src/detection/cpu/cpu_apple.c
648662
src/detection/cpucache/cpucache_apple.c
@@ -709,6 +723,7 @@ elseif(WIN32)
709723
src/detection/board/board_windows.c
710724
src/detection/bootmgr/bootmgr_windows.c
711725
src/detection/brightness/brightness_windows.cpp
726+
src/detection/btrfs/btrfs_nosupport.c
712727
src/detection/chassis/chassis_windows.c
713728
src/detection/cpu/cpu_windows.c
714729
src/detection/cpucache/cpucache_windows.c
@@ -776,6 +791,7 @@ elseif(SunOS)
776791
src/detection/board/board_windows.c
777792
src/detection/bootmgr/bootmgr_nosupport.c
778793
src/detection/brightness/brightness_nosupport.c
794+
src/detection/btrfs/btrfs_nosupport.c
779795
src/detection/chassis/chassis_windows.c
780796
src/detection/cpu/cpu_sunos.c
781797
src/detection/cpucache/cpucache_shared.c
@@ -885,8 +901,8 @@ add_library(libfastfetch OBJECT
885901
)
886902

887903
if(yyjson_FOUND)
888-
target_compile_definitions(libfastfetch PRIVATE FF_USE_SYSTEM_YYJSON)
889-
target_link_libraries(libfastfetch PRIVATE yyjson::yyjson)
904+
target_compile_definitions(libfastfetch PUBLIC FF_USE_SYSTEM_YYJSON)
905+
target_link_libraries(libfastfetch PUBLIC yyjson::yyjson)
890906
# `target_link_libraries(yyjson::yyjson)` sets rpath implicitly
891907
else()
892908
# Used for dlopen finding dylibs installed by homebrew
@@ -928,11 +944,11 @@ elseif(SunOS)
928944
endif()
929945

930946
if(HAVE_STATX)
931-
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_STATX)
947+
target_compile_definitions(libfastfetch PUBLIC FF_HAVE_STATX)
932948
endif()
933949

934950
if(HAVE_WCWIDTH)
935-
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WCWIDTH)
951+
target_compile_definitions(libfastfetch PUBLIC FF_HAVE_WCWIDTH)
936952
endif()
937953

938954
if(NOT "${CUSTOM_PCI_IDS_PATH}" STREQUAL "")
@@ -1264,6 +1280,22 @@ if(NOT WIN32)
12641280
endif()
12651281
endif()
12661282

1283+
set(PACKAGES_DISABLE_LIST "")
1284+
foreach(package_manager ${PACKAGE_MANAGERS})
1285+
if(PACKAGES_DISABLE_${package_manager})
1286+
list(APPEND PACKAGES_DISABLE_LIST "${package_manager}")
1287+
endif()
1288+
endforeach()
1289+
if("${PACKAGES_DISABLE_LIST}" STREQUAL "")
1290+
set(PACKAGES_DISABLE_LIST "FF_PACKAGES_FLAG_NONE")
1291+
else()
1292+
message(STATUS "Disabled package managers: ${PACKAGES_DISABLE_LIST}")
1293+
list(TRANSFORM PACKAGES_DISABLE_LIST PREPEND "FF_PACKAGES_FLAG_")
1294+
list(TRANSFORM PACKAGES_DISABLE_LIST APPEND "_BIT")
1295+
list(JOIN PACKAGES_DISABLE_LIST " | " PACKAGES_DISABLE_LIST)
1296+
endif()
1297+
target_compile_definitions(libfastfetch PRIVATE FF_PACKAGES_DISABLE_LIST=${PACKAGES_DISABLE_LIST})
1298+
12671299
######################
12681300
# Executable targets #
12691301
######################
@@ -1294,13 +1326,6 @@ set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
12941326
set_target_properties(fastfetch PROPERTIES LINKER_LANGUAGE C)
12951327
set_target_properties(flashfetch PROPERTIES LINKER_LANGUAGE C)
12961328

1297-
if(yyjson_FOUND)
1298-
target_compile_definitions(fastfetch PRIVATE FF_USE_SYSTEM_YYJSON)
1299-
target_link_libraries(fastfetch PRIVATE yyjson::yyjson)
1300-
target_compile_definitions(flashfetch PRIVATE FF_USE_SYSTEM_YYJSON)
1301-
target_link_libraries(flashfetch PRIVATE yyjson::yyjson)
1302-
endif()
1303-
13041329
if(WIN32)
13051330
target_sources(fastfetch
13061331
PRIVATE src/util/windows/version.rc
@@ -1347,9 +1372,6 @@ if (BUILD_TESTS)
13471372
target_link_libraries(fastfetch-test-format
13481373
PRIVATE libfastfetch
13491374
)
1350-
if(yyjson_FOUND)
1351-
target_compile_definitions(fastfetch-test-format PRIVATE FF_USE_SYSTEM_YYJSON)
1352-
endif()
13531375

13541376
enable_testing()
13551377
add_test(NAME test-strbuf COMMAND fastfetch-test-strbuf)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are [screenshots on different platforms](https://github.com/fastfetch-cli/
2727

2828
### Linux
2929

30-
Some distros packaged an outdated fastfetch version. Older version receive no support, so please try always to use the latest version.
30+
Some distros package an outdated fastfetch version. Older versions receive no support, so please try always to use the latest version.
3131

3232
* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (for Ubuntu 22.04 or newer)
3333
* Debian: `apt install fastfetch` (for Debian 13 or newer)
@@ -90,7 +90,7 @@ See Uncyclo: https://github.com/fastfetch-cli/fastfetch/wiki/Building
9090

9191
Fastfetch uses the JSONC (or JSON with comments) for configuration. [See Uncyclo for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration). There are some premade config files in [`presets`](presets), including the ones used for the screenshots above. You can load them using `-c <filename>`. Those files can serve as examples of the configuration syntax.
9292

93-
Logos can be heavily customized too; see the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for more information.
93+
Logos can also be heavily customized; see the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for more information.
9494

9595

9696
## Packaging
@@ -112,7 +112,7 @@ Logos can be heavily customized too; see the [logo documentation](https://github
112112
2. Fastfetch is faster. As the name suggests.
113113
3. Fastfetch has a greater number of features, though by default fastfetch only has a few modules enabled; use `fastfetch -c all` to find what you want.
114114
4. Fastfetch is more configurable. You can find more information in the Uncyclo: <https://github.com/fastfetch-cli/fastfetch/wiki/Configuration>.
115-
5. Fastfetch is more polished. For example, neofetch prints `555MiB` in `Memory` module and `23G` in `Disk` module, whereas fastfetch prints `555.00 MiB` and `22.97 GiB` respectively.
115+
5. Fastfetch is more polished. For example, neofetch prints `555 MiB` in the Memory module and `23 G` in the Disk module, whereas fastfetch prints `555.00 MiB` and `22.97 GiB` respectively.
116116
6. Fastfetch is more accurate. For example, [neofetch never actually supports the Wayland protocol](https://github.com/dylanaraps/neofetch/pull/2395).
117117

118118
### Q: Fastfetch shows my local IP address. It leaks my privacy!

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.24.0) jammy; urgency=medium
2+
3+
* Update to 2.24.0
4+
5+
-- Carter Li <[email protected]> Wed, 11 Sep 2024 13:50:02 +0800
6+
17
fastfetch (2.23.0) jammy; urgency=medium
28

39
* Update to 2.23.0

debian/files

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

doc/json_schema.json

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
"processingTimeout": {
338338
"type": "integer",
339339
"description": "Set the timeout (ms) when waiting for child processes, `-1` for no timeout",
340-
"default": 1000
340+
"default": 5000
341341
},
342342
"preRun": {
343343
"type": "string",
@@ -655,6 +655,7 @@
655655
"bootmgr",
656656
"break",
657657
"brightness",
658+
"btrfs",
658659
"camera",
659660
"chassis",
660661
"cpu",
@@ -887,10 +888,6 @@
887888
{
888889
"const": "wmtheme",
889890
"description": "Print current theme of window manager"
890-
},
891-
{
892-
"const": "zpool",
893-
"description": "Print ZFS storage pools"
894891
}
895892
]
896893
},
@@ -1059,6 +1056,38 @@
10591056
}
10601057
}
10611058
},
1059+
{
1060+
"title": "BTRFS",
1061+
"type": "object",
1062+
"additionalProperties": false,
1063+
"properties": {
1064+
"type": {
1065+
"const": "btrfs",
1066+
"description": "Print Btrfs volumes"
1067+
},
1068+
"percent": {
1069+
"$ref": "#/$defs/percent"
1070+
},
1071+
"key": {
1072+
"$ref": "#/$defs/key"
1073+
},
1074+
"keyColor": {
1075+
"$ref": "#/$defs/keyColor"
1076+
},
1077+
"keyIcon": {
1078+
"$ref": "#/$defs/keyIcon"
1079+
},
1080+
"keyWidth": {
1081+
"$ref": "#/$defs/keyWidth"
1082+
},
1083+
"outputColor": {
1084+
"$ref": "#/$defs/outputColor"
1085+
},
1086+
"format": {
1087+
"$ref": "#/$defs/format"
1088+
}
1089+
}
1090+
},
10621091
{
10631092
"title": "Chassis",
10641093
"type": "object",
@@ -1634,6 +1663,16 @@
16341663
"type": "boolean",
16351664
"default": false
16361665
},
1666+
"showSpeed": {
1667+
"description": "Show ethernet rx speed",
1668+
"type": "boolean",
1669+
"default": false
1670+
},
1671+
"showMtu": {
1672+
"description": "Show MTU",
1673+
"type": "boolean",
1674+
"default": false
1675+
},
16371676
"showMac": {
16381677
"description": "Show MAC addresses",
16391678
"type": "boolean",
@@ -2261,6 +2300,38 @@
22612300
"$ref": "#/$defs/format"
22622301
}
22632302
}
2303+
},
2304+
{
2305+
"title": "Zpool",
2306+
"type": "object",
2307+
"additionalProperties": false,
2308+
"properties": {
2309+
"type": {
2310+
"const": "zpool",
2311+
"description": "Print ZFS storage pools"
2312+
},
2313+
"percent": {
2314+
"$ref": "#/$defs/percent"
2315+
},
2316+
"key": {
2317+
"$ref": "#/$defs/key"
2318+
},
2319+
"keyColor": {
2320+
"$ref": "#/$defs/keyColor"
2321+
},
2322+
"keyIcon": {
2323+
"$ref": "#/$defs/keyIcon"
2324+
},
2325+
"keyWidth": {
2326+
"$ref": "#/$defs/keyWidth"
2327+
},
2328+
"outputColor": {
2329+
"$ref": "#/$defs/outputColor"
2330+
},
2331+
"format": {
2332+
"$ref": "#/$defs/format"
2333+
}
2334+
}
22642335
}
22652336
]
22662337
}

presets/all.jsonc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@
5454
"physicalmemory",
5555
"swap",
5656
"disk",
57+
"btrfs",
5758
"zpool",
58-
"battery",
59+
{
60+
"type": "battery",
61+
"temp": true
62+
},
5963
"poweradapter",
6064
"player",
6165
"media",
@@ -66,7 +70,9 @@
6670
{
6771
"type": "localip",
6872
"showIpv6": true,
69-
"showMac": true
73+
"showMac": true,
74+
"showSpeed": true,
75+
"showMtu": true
7076
},
7177
"dns",
7278
"wifi",

0 commit comments

Comments
 (0)