Skip to content

Commit 14f1278

Browse files
CarterLiDariqqZBookCMDxoltiaXray-OS
authored
Release: v2.48.0 (#1848)
Co-authored-by: Dariqq <[email protected]> Co-authored-by: Robert Nilson <[email protected]> Co-authored-by: Juan Llamas <[email protected]> Co-authored-by: Angel Gustavo Lopez <[email protected]>
2 parents 8b40a81 + c2c6856 commit 14f1278

Some content is hidden

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

46 files changed

+1078
-295
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,33 +683,59 @@ jobs:
683683
haiku-amd64:
684684
name: Haiku-amd64
685685
runs-on: ubuntu-latest
686-
if: false
687686
permissions:
688687
security-events: write
689688
contents: read
690689
steps:
691690
- name: checkout repository
692691
uses: actions/checkout@v4
693692

694-
- name: run VM
693+
- name: Fixup VM
695694
uses: cross-platform-actions/action@master
696695
with:
697696
operating_system: haiku
697+
version: 'r1beta5'
698698
architecture: x86-64
699699
cpu_count: 4
700700
shell: bash
701+
sync_files: false
702+
shutdown_vm: false
703+
run: |
704+
mv '/home/runner/work' '/boot/home/work'
705+
ln -sf '/boot/home/work' '/home/runner/work'
706+
707+
- name: Sync files to VM
708+
uses: cross-platform-actions/action@master
709+
with:
710+
operating_system: haiku
701711
version: 'r1beta5'
712+
architecture: x86-64
713+
cpu_count: 4
714+
shell: bash
715+
sync_files: runner-to-vm
716+
shutdown_vm: false
702717
run: |
703-
uname -a
718+
chown -R $(id -u):$(id -g) $(pwd)
704719
ls -l
720+
721+
- name: run VM
722+
uses: cross-platform-actions/action@master
723+
with:
724+
operating_system: haiku
725+
version: 'r1beta5'
726+
architecture: x86-64
727+
cpu_count: 4
728+
shell: bash
729+
sync_files: vm-to-runner
730+
run: |
731+
uname -a
705732
pkgman install -y git dbus_devel mesa_devel libelf_devel imagemagick_devel opencl_headers ocl_icd_devel vulkan_devel zlib_devel chafa_devel cmake gcc make pkgconfig python3.10
706733
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
707734
cmake --build . --target package --verbose -j4
708735
./fastfetch --list-features
709736
time ./fastfetch -c presets/ci.jsonc --stat false
710737
time ./fastfetch -c presets/ci.jsonc --format json
711738
time ./flashfetch
712-
ldd fastfetch
713739
ctest --output-on-failure
714740
715741
- name: upload artifacts
@@ -861,6 +887,7 @@ jobs:
861887
- openbsd-amd64
862888
- netbsd-amd64
863889
- sunos-amd64
890+
- haiku-amd64
864891
- windows-amd64
865892
- windows-aarch64
866893
permissions:

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
# 2.48.0
2+
3+
Features:
4+
* Add support for detecting Fedora variants (#1830, OS, Linux)
5+
* Currently supported variants: CoreOS, Kinoite, Sericea, Silverblue
6+
* Optimize GPU detection on Windows when `--gpu-driver-specific` is not used (GPU, Windows)
7+
* Improve accuracy of GPU type detection. Previously it was guessed based on the dedicated vmem size, which causes issues on newer AMD integrated GPUs such as 9000 HX and AI 9 HX series. Supported on Windows 8.1 or later.
8+
* Add support for generic frequency detection of GPU 3D engine on Windows 11 22H2 or later.
9+
* Improve performance. GPU temperature detection is significantly improved when `--gpu-driver-specific` is not used.
10+
* Improve performance and security when spawning child processes by replacing `fork-exec` with `posix_spawn` (*nix)
11+
* Improve accuracy of sound device detection on macOS (Sound, macOS)
12+
* Trim leading and trailing whitespaces in disk serial numbers (PhysicalDisk)
13+
* Add `/etc/profiles/per-user` detection for Nix user packages (#1782, Packages, Linux)
14+
* Introduce `years` (whole years as integer), `days-of-year` (days since the last anniversary) and `years-fraction` (years as fraction, e.g. 1.5 means 1 year and 6 months) formatting placeholder to `Disk` (since disk creation), `Users` (since user login) and `Uptime` (since system boot) modules
15+
* For example: `fastfetch -s disk --disk-key 'OS Installation' --disk-format '{years} years {days-of-year} days'`
16+
* Add `--fraction-ndigits` option to specify the number of digits after the decimal point when displaying ordinary fractional values
17+
* Typically used with `{years-fraction}` above
18+
* This option does not affect percentage values, sizes, etc, which are controlled by individual options.
19+
20+
Bugfixes:
21+
* Fix compilation issues when not using `-DBINARY_LINK_TYPE=dlopen`
22+
* Regression from v2.47.0
23+
* Note: this option was added for debugging purposes only and is not recommended for production use
24+
* Replace `MTLDevice::hasUnifiedMemory` with `MTLDevice::location` for GPU type Detection (GPU, macOS)
25+
* This should resolve the issue where discrete GPUs were detected as integrated GPUs on Intel MacBooks with multi-GPU configurations.
26+
* Prevent text files from being loaded as image files (#1843, Logo)
27+
28+
Logos:
29+
* Add Minimal System
30+
* Add AxOS
31+
* Rename Ada to Xray OS
32+
133
# 2.47.0
234

335
Features:

CMakeLists.txt

Lines changed: 2 additions & 3 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.47.0
4+
VERSION 2.48.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -336,7 +336,7 @@ endif()
336336
# Ascii image data #
337337
####################
338338

339-
file(GLOB LOGO_FILES "src/logo/ascii/*.txt")
339+
file(GLOB LOGO_FILES CONFIGURE_DEPENDS "src/logo/ascii/*.txt")
340340
set(LOGO_BUILTIN_H "#pragma once\n#pragma GCC diagnostic ignored \"-Wtrigraphs\"\n\n")
341341
foreach(file ${LOGO_FILES})
342342
fastfetch_load_text("${file}" content)
@@ -1582,7 +1582,6 @@ elseif(WIN32)
15821582
PRIVATE "ws2_32"
15831583
PRIVATE "ntdll"
15841584
PRIVATE "version"
1585-
PRIVATE "setupapi"
15861585
PRIVATE "hid"
15871586
PRIVATE "wtsapi32"
15881587
PRIVATE "imagehlp"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[![GitHub release (with filter)](https://img.shields.io/github/v/release/fastfetch-cli/fastfetch?logo=github)](https://github.com/fastfetch-cli/fastfetch/releases)
1111
[![latest packaged version(s)](https://repology.org/badge/latest-versions/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
1212
[![Packaging status](https://repology.org/badge/tiny-repos/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
13+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fastfetch-cli/fastfetch)
1314

1415
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it in a visually appealing way. It is written mainly in C, with a focus on performance and customizability. Currently, it supports Linux, macOS, Windows 7+, Android, FreeBSD, OpenBSD, NetBSD, DragonFly, Haiku, and SunOS.
1516

@@ -92,7 +93,7 @@ See the Wiki: https://github.com/fastfetch-cli/fastfetch/wiki/Building
9293

9394
* Run with default configuration: `fastfetch`
9495
* Run with [all supported modules](https://github.com/fastfetch-cli/fastfetch/wiki/Support+Status#available-modules) to find what interests you: `fastfetch -c all.jsonc`
95-
* View all data that fastfetch detects: `fastfetch -s <module> --format json`
96+
* View all data that fastfetch detects: `fastfetch -s <module1>[:<module2>][:<module3>] --format json`
9697
* Display help messages: `fastfetch --help`
9798
* Generate a config file based on command line arguments: `fastfetch --arg1 --arg2 --gen-config`
9899

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.47.0) jammy; urgency=medium
2+
3+
* Update to 2.47.0
4+
5+
-- Carter Li <[email protected]> Thu, 03 Jul 2025 14:51:45 +0800
6+
17
fastfetch (2.46.0) jammy; urgency=medium
28

39
* Update to 2.46.0

debian/files

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

doc/json_schema.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
"type": "string"
184184
},
185185
"diskFormat": {
186-
"description": "Output format of the module `Disk`. See Wiki for formatting syntax\n 1. {size-used}: Size used\n 2. {size-total}: Size total\n 3. {size-percentage}: Size percentage num\n 4. {files-used}: Files used\n 5. {files-total}: Files total\n 6. {files-percentage}: Files percentage num\n 7. {is-external}: True if external volume\n 8. {is-hidden}: True if hidden volume\n 9. {filesystem}: Filesystem\n 10. {name}: Label / name\n 11. {is-readonly}: True if read-only\n 12. {create-time}: Create time in local timezone\n 13. {size-percentage-bar}: Size percentage bar\n 14. {files-percentage-bar}: Files percentage bar\n 15. {days}: Days after creation\n 16. {hours}: Hours after creation\n 17. {minutes}: Minutes after creation\n 18. {seconds}: Seconds after creation\n 19. {milliseconds}: Milliseconds after creation\n 20. {mountpoint}: Mount point / drive letter\n 21. {mount-from}: Mount from (device path)",
186+
"description": "Output format of the module `Disk`. See Wiki for formatting syntax\n 1. {size-used}: Size used\n 2. {size-total}: Size total\n 3. {size-percentage}: Size percentage num\n 4. {files-used}: Files used\n 5. {files-total}: Files total\n 6. {files-percentage}: Files percentage num\n 7. {is-external}: True if external volume\n 8. {is-hidden}: True if hidden volume\n 9. {filesystem}: Filesystem\n 10. {name}: Label / name\n 11. {is-readonly}: True if read-only\n 12. {create-time}: Create time in local timezone\n 13. {size-percentage-bar}: Size percentage bar\n 14. {files-percentage-bar}: Files percentage bar\n 15. {days}: Days after creation\n 16. {hours}: Hours after creation\n 17. {minutes}: Minutes after creation\n 18. {seconds}: Seconds after creation\n 19. {milliseconds}: Milliseconds after creation\n 20. {mountpoint}: Mount point / drive letter\n 21. {mount-from}: Mount from (device path)\n 22. {years}: Years integer after creation\n 23. {days-of-year}: Days of year after creation\n 24. {years-fraction}: Years fraction after creation",
187187
"type": "string"
188188
},
189189
"diskioFormat": {
@@ -306,10 +306,6 @@
306306
"description": "Output format of the module `PublicIp`. See Wiki for formatting syntax\n 1. {ip}: Public IP address\n 2. {location}: Location",
307307
"type": "string"
308308
},
309-
"separatorFormat": {
310-
"description": "Output format of the module `Separator`. See Wiki for formatting syntax\n 1. {string}: Separator string\n 2. {outputColor}: Output color\n 3. {length}: Length",
311-
"type": "string"
312-
},
313309
"shellFormat": {
314310
"description": "Output format of the module `Shell`. See Wiki for formatting syntax\n 1. {process-name}: Shell process name\n 2. {exe}: The first argument of the command line when running the shell\n 3. {exe-name}: Shell base name of arg0\n 4. {version}: Shell version\n 5. {pid}: Shell pid\n 6. {pretty-name}: Shell pretty name\n 7. {exe-path}: Shell full exe path\n 8. {tty}: Shell tty used",
315311
"type": "string"
@@ -319,7 +315,7 @@
319315
"type": "string"
320316
},
321317
"swapFormat": {
322-
"description": "Output format of the module `Swap`. See Wiki for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)",
318+
"description": "Output format of the module `Swap`. See Wiki for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)\n 5. {name}: Name",
323319
"type": "string"
324320
},
325321
"terminalFormat": {
@@ -351,11 +347,11 @@
351347
"type": "string"
352348
},
353349
"uptimeFormat": {
354-
"description": "Output format of the module `Uptime`. See Wiki for formatting syntax\n 1. {days}: Days\n 2. {hours}: Hours\n 3. {minutes}: Minutes\n 4. {seconds}: Seconds\n 5. {milliseconds}: Milliseconds\n 6. {boot-time}: Boot time in local timezone",
350+
"description": "Output format of the module `Uptime`. See Wiki for formatting syntax\n 1. {days}: Days after boot\n 2. {hours}: Hours after boot\n 3. {minutes}: Minutes after boot\n 4. {seconds}: Seconds after boot\n 5. {milliseconds}: Milliseconds after boot\n 6. {boot-time}: Boot time in local timezone\n 7. {years}: Years integer after boot\n 8. {days-of-year}: Days of year after boot\n 9. {years-fraction}: Years fraction after boot",
355351
"type": "string"
356352
},
357353
"usersFormat": {
358-
"description": "Output format of the module `Users`. See Wiki for formatting syntax\n 1. {name}: User name\n 2. {host-name}: Host name\n 3. {session}: Session name\n 4. {client-ip}: Client IP\n 5. {login-time}: Login Time in local timezone\n 6. {days}: Days after login\n 7. {hours}: Hours after login\n 8. {minutes}: Minutes after login\n 9. {seconds}: Seconds after login\n 10. {milliseconds}: Milliseconds after login",
354+
"description": "Output format of the module `Users`. See Wiki for formatting syntax\n 1. {name}: User name\n 2. {host-name}: Host name\n 3. {session}: Session name\n 4. {client-ip}: Client IP\n 5. {login-time}: Login Time in local timezone\n 6. {days}: Days after login\n 7. {hours}: Hours after login\n 8. {minutes}: Minutes after login\n 9. {seconds}: Seconds after login\n 10. {milliseconds}: Milliseconds after login\n 11. {years}: Years integer after login\n 12. {days-of-year}: Days of year after login\n 13. {years-fraction}: Years fraction after login",
359355
"type": "string"
360356
},
361357
"versionFormat": {
@@ -934,6 +930,28 @@
934930
}
935931
}
936932
},
933+
"fraction": {
934+
"type": "object",
935+
"additionalProperties": false,
936+
"description": "Set how ordinary fraction numbers should be displayed",
937+
"properties": {
938+
"ndigits": {
939+
"oneOf": [
940+
{
941+
"type": "number",
942+
"description": "Set the number of digits to keep after the decimal point when formatting ordinary fraction numbers",
943+
"minimum": 0,
944+
"maximum": 9
945+
},
946+
{
947+
"type": "null",
948+
"description": "The number of digits will be automatically determined based on the value"
949+
}
950+
],
951+
"default": null
952+
}
953+
}
954+
},
937955
"noBuffer": {
938956
"type": "boolean",
939957
"description": "Whether to disable the stdout application buffer",

presets/examples/27.jsonc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3+
"logo": {
4+
"type": "small",
5+
"padding": {
6+
"top": 1
7+
}
8+
},
9+
"display": {
10+
"separator": " "
11+
},
12+
"modules": [
13+
"break",
14+
"title",
15+
{
16+
"type": "os",
17+
"key": "os ",
18+
"keyColor": "red"
19+
},
20+
{
21+
"type": "kernel",
22+
"key": "kernel",
23+
"keyColor": "green"
24+
},
25+
{
26+
"type": "host",
27+
"format": "{vendor} {family}",
28+
"key": "host ",
29+
"keyColor": "yellow"
30+
},
31+
{
32+
"type": "packages",
33+
"key": "pkgs ",
34+
"keyColor": "blue"
35+
},
36+
{
37+
"type": "uptime",
38+
"format": "{?days}{days}d {?}{hours}h {minutes}m",
39+
"key": "uptime",
40+
"keyColor": "magenta"
41+
},
42+
{
43+
"type": "memory",
44+
"key": "memory",
45+
"keyColor": "cyan"
46+
},
47+
"break"
48+
]
49+
}

src/common/format.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg)
3232
ffStrbufAppend(buffer, (FFstrbuf*)formatarg->value);
3333
break;
3434
case FF_FORMAT_ARG_TYPE_FLOAT:
35-
ffStrbufAppendF(buffer, "%f", *(float*)formatarg->value);
35+
if (instance.config.display.fractionNdigits >= 0)
36+
ffStrbufAppendF(buffer, "%.*f", instance.config.display.fractionNdigits, *(float*)formatarg->value);
37+
else
38+
ffStrbufAppendF(buffer, "%g", *(float*)formatarg->value);
3639
break;
3740
case FF_FORMAT_ARG_TYPE_DOUBLE:
38-
ffStrbufAppendF(buffer, "%g", *(double*)formatarg->value);
41+
if (instance.config.display.fractionNdigits >= 0)
42+
ffStrbufAppendF(buffer, "%.*f", instance.config.display.fractionNdigits, *(double*)formatarg->value);
43+
else
44+
ffStrbufAppendF(buffer, "%g", *(double*)formatarg->value);
3945
break;
4046
case FF_FORMAT_ARG_TYPE_BOOL:
4147
ffStrbufAppendS(buffer, *(bool*)formatarg->value ? "true" : "false");
@@ -108,6 +114,7 @@ static inline bool formatArgSet(const FFformatarg* arg)
108114
{
109115
return arg->value != NULL && (
110116
(arg->type == FF_FORMAT_ARG_TYPE_DOUBLE && *(double*)arg->value > 0.0) || //Also is false for NaN
117+
(arg->type == FF_FORMAT_ARG_TYPE_FLOAT && *(float*)arg->value > 0.0) || //Also is false for NaN
111118
(arg->type == FF_FORMAT_ARG_TYPE_INT && *(int*)arg->value > 0) ||
112119
(arg->type == FF_FORMAT_ARG_TYPE_STRBUF && ((FFstrbuf*)arg->value)->length > 0) ||
113120
(arg->type == FF_FORMAT_ARG_TYPE_STRING && ffStrSet((char*)arg->value)) ||

src/common/library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void* ffLibraryLoad(const char* path, int maxVersion, ...);
7474
FF_MAYBE_UNUSED void* libraryObjectName = NULL; // Placeholder
7575

7676
#define FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, symbolMapping, symbolName, returnValue) \
77-
symbolMapping = (__typeof__(&symbolName)) &symbolName
77+
symbolMapping = (__typeof__(&symbolName)) &symbolName;
7878

7979
#define FF_LIBRARY_LOAD_SYMBOL(library, symbolName, returnValue) \
8080
FF_MAYBE_UNUSED __typeof__(&symbolName) FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, ff ## symbolName, symbolName, returnValue);

0 commit comments

Comments
 (0)