Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b015fd5
Packaging: update debian stuff [ci skip]
CarterLi Jul 3, 2025
821462e
Chore: Add a missing semicolon (#1828)
Dariqq Jul 4, 2025
64910d0
OS (Linux): detect fedora variants
CarterLi Jul 4, 2025
3a1f048
PhysicalDisk: unifying white space trimming
CarterLi Jul 5, 2025
817f70c
Presets: add a new example
CarterLi Jul 5, 2025
2029679
GPU (Windows): use `CMAPI` instead of `SetupAPI`
CarterLi Jul 6, 2025
c65fb1a
Battery (Windows): use `CMAPI` instead of `SetupAPI`
CarterLi Jul 6, 2025
010b2c6
CMake (Windows): remove `setupapi` dependency
CarterLi Jul 6, 2025
9ba30ad
GPU (Windows): add driver version fall back
CarterLi Jul 6, 2025
61adc7c
GPU (Windows): new method to detect device type
CarterLi Jul 7, 2025
6871c8b
GPU (Windows): fix Win7 compatibility
CarterLi Jul 7, 2025
23e4d1c
Chore (Windows): tidy
CarterLi Jul 7, 2025
d00fca2
GPU (Windows): clean up
CarterLi Jul 7, 2025
b178e43
GPU (Windows): use nvapi to detect GPU type
CarterLi Jul 8, 2025
2622fc1
Chore (Linux): silence compiler warnings
CarterLi Jul 9, 2025
2eda646
Processing (Linux): use `posix_spawnp` for better performance
CarterLi Jul 9, 2025
7248868
Sound (macOS): improve device id detection
CarterLi Jul 7, 2025
4d377b9
CI (Haiku): Apply work-around for work directory
CarterLi Jul 10, 2025
442d58b
Revert "GPU (macOS): update how integrated GPUs are detected"
CarterLi Jul 10, 2025
2d496c9
Logo (Builtin): add the Minimal System logo (#1837)
ZBookCMD Jul 10, 2025
939f428
Logo (Builtin): add AxOS
CarterLi Jul 11, 2025
ab496b2
GPU (Windows): greatly improve performance of GPU temp detection
CarterLi Jul 11, 2025
382c0cd
GPU (Windows): ignore invalid temps
CarterLi Jul 12, 2025
94a5228
Packages (Linux): add /etc/profiles/per-user detection for nix user p…
xoltia Jul 11, 2025
5011edc
Packages (Linux): clean up nix user package detection
xoltia Jul 11, 2025
8372708
GPU (Intel): prefer matching GPU with bus id
CarterLi Jul 12, 2025
102e8fc
GPU (Windows): detect GPU frequency by default
CarterLi Jul 12, 2025
eae6904
GPU (Windows): more method to detect device name
CarterLi Jul 12, 2025
c3ce5ac
Logo: don't parse file paths as builtin logo name
CarterLi Jul 13, 2025
fb8a04f
Logo: don't load text files as image file
CarterLi Jul 13, 2025
97255f3
Logo: load `.raw` files as raw image file
CarterLi Jul 13, 2025
c5c0e54
Logo: don't print builtin logo if the provided logo source cannot be …
CarterLi Jul 13, 2025
8a00f2d
GPU (Windows): fix compiling on x86-32
CarterLi Jul 14, 2025
cc8f8ff
README: add DeepWiki badge [ci skip]
CarterLi Jul 14, 2025
6f3ed4a
Processing (Linux): cache the index of `$LANG`
CarterLi Jul 15, 2025
b4e65e7
README: document how to run multiple modules on command line [ci skip]
CarterLi Jul 15, 2025
60a54f4
CMake: reconfigure after adding / removing logos
CarterLi Jul 15, 2025
1311a80
Logo (Builtin): rename ada to xray_os (#1845)
Xray-OS Jul 15, 2025
dde0c22
Disk: add keys `years`, `days-of-year` and `years-fraction`
CarterLi Jul 15, 2025
30b1e29
JsonSchema: update `xxxFormat` [ci skip]
CarterLi Jul 15, 2025
a734f18
Chore (Linux): silience compiler warnings
CarterLi Jul 15, 2025
6851e7b
Uptime / Users: add `years`, `days-of-year` and `year-fraction`
CarterLi Jul 16, 2025
468d1e0
Display: add option `--fraction-ndigits`
CarterLi Jul 16, 2025
ea4fc7b
Separator: remove `formatArgs`
CarterLi Jul 16, 2025
8e77347
Logo: partially revert c5c0e54
CarterLi Jul 16, 2025
c89f3d2
Release: v2.48.0
CarterLi Jul 16, 2025
c2c6856
Doc: optimize README; fix typo
CarterLi Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,33 +683,59 @@ jobs:
haiku-amd64:
name: Haiku-amd64
runs-on: ubuntu-latest
if: false
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
- name: Fixup VM
uses: cross-platform-actions/action@master
with:
operating_system: haiku
version: 'r1beta5'
architecture: x86-64
cpu_count: 4
shell: bash
sync_files: false
shutdown_vm: false
run: |
mv '/home/runner/work' '/boot/home/work'
ln -sf '/boot/home/work' '/home/runner/work'

- name: Sync files to VM
uses: cross-platform-actions/action@master
with:
operating_system: haiku
version: 'r1beta5'
architecture: x86-64
cpu_count: 4
shell: bash
sync_files: runner-to-vm
shutdown_vm: false
run: |
uname -a
chown -R $(id -u):$(id -g) $(pwd)
ls -l

- name: run VM
uses: cross-platform-actions/action@master
with:
operating_system: haiku
version: 'r1beta5'
architecture: x86-64
cpu_count: 4
shell: bash
sync_files: vm-to-runner
run: |
uname -a
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
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest --output-on-failure

- name: upload artifacts
Expand Down Expand Up @@ -861,6 +887,7 @@ jobs:
- openbsd-amd64
- netbsd-amd64
- sunos-amd64
- haiku-amd64
- windows-amd64
- windows-aarch64
permissions:
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 2.48.0

Features:
* Add support for detecting Fedora variants (#1830, OS, Linux)
* Currently supported variants: CoreOS, Kinoite, Sericea, Silverblue
* Optimize GPU detection on Windows when `--gpu-driver-specific` is not used (GPU, Windows)
* 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.
* Add support for generic frequency detection of GPU 3D engine on Windows 11 22H2 or later.
* Improve performance. GPU temperature detection is significantly improved when `--gpu-driver-specific` is not used.
* Improve performance and security when spawning child processes by replacing `fork-exec` with `posix_spawn` (*nix)
* Improve accuracy of sound device detection on macOS (Sound, macOS)
* Trim leading and trailing whitespaces in disk serial numbers (PhysicalDisk)
* Add `/etc/profiles/per-user` detection for Nix user packages (#1782, Packages, Linux)
* 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
* For example: `fastfetch -s disk --disk-key 'OS Installation' --disk-format '{years} years {days-of-year} days'`
* Add `--fraction-ndigits` option to specify the number of digits after the decimal point when displaying ordinary fractional values
* Typically used with `{years-fraction}` above
* This option does not affect percentage values, sizes, etc, which are controlled by individual options.

Bugfixes:
* Fix compilation issues when not using `-DBINARY_LINK_TYPE=dlopen`
* Regression from v2.47.0
* Note: this option was added for debugging purposes only and is not recommended for production use
* Replace `MTLDevice::hasUnifiedMemory` with `MTLDevice::location` for GPU type Detection (GPU, macOS)
* This should resolve the issue where discrete GPUs were detected as integrated GPUs on Intel MacBooks with multi-GPU configurations.
* Prevent text files from being loaded as image files (#1843, Logo)

Logos:
* Add Minimal System
* Add AxOS
* Rename Ada to Xray OS

# 2.47.0

Features:
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.47.0
VERSION 2.48.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -336,7 +336,7 @@ endif()
# Ascii image data #
####################

file(GLOB LOGO_FILES "src/logo/ascii/*.txt")
file(GLOB LOGO_FILES CONFIGURE_DEPENDS "src/logo/ascii/*.txt")
set(LOGO_BUILTIN_H "#pragma once\n#pragma GCC diagnostic ignored \"-Wtrigraphs\"\n\n")
foreach(file ${LOGO_FILES})
fastfetch_load_text("${file}" content)
Expand Down Expand Up @@ -1582,7 +1582,6 @@ elseif(WIN32)
PRIVATE "ws2_32"
PRIVATE "ntdll"
PRIVATE "version"
PRIVATE "setupapi"
PRIVATE "hid"
PRIVATE "wtsapi32"
PRIVATE "imagehlp"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![GitHub release (with filter)](https://img.shields.io/github/v/release/fastfetch-cli/fastfetch?logo=github)](https://github.com/fastfetch-cli/fastfetch/releases)
[![latest packaged version(s)](https://repology.org/badge/latest-versions/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
[![Packaging status](https://repology.org/badge/tiny-repos/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fastfetch-cli/fastfetch)

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.

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

* Run with default configuration: `fastfetch`
* 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`
* View all data that fastfetch detects: `fastfetch -s <module> --format json`
* View all data that fastfetch detects: `fastfetch -s <module1>[:<module2>][:<module3>] --format json`
* Display help messages: `fastfetch --help`
* Generate a config file based on command line arguments: `fastfetch --arg1 --arg2 --gen-config`

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.47.0) jammy; urgency=medium

* Update to 2.47.0

-- Carter Li <[email protected]> Thu, 03 Jul 2025 14:51:45 +0800

fastfetch (2.46.0) jammy; urgency=medium

* Update to 2.46.0
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.46.0_source.buildinfo universe/utils optional
fastfetch_2.47.0_source.buildinfo universe/utils optional
34 changes: 26 additions & 8 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"type": "string"
},
"diskFormat": {
"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)",
"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",
"type": "string"
},
"diskioFormat": {
Expand Down Expand Up @@ -306,10 +306,6 @@
"description": "Output format of the module `PublicIp`. See Wiki for formatting syntax\n 1. {ip}: Public IP address\n 2. {location}: Location",
"type": "string"
},
"separatorFormat": {
"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",
"type": "string"
},
"shellFormat": {
"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",
"type": "string"
Expand All @@ -319,7 +315,7 @@
"type": "string"
},
"swapFormat": {
"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)",
"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",
"type": "string"
},
"terminalFormat": {
Expand Down Expand Up @@ -351,11 +347,11 @@
"type": "string"
},
"uptimeFormat": {
"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",
"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",
"type": "string"
},
"usersFormat": {
"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",
"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",
"type": "string"
},
"versionFormat": {
Expand Down Expand Up @@ -934,6 +930,28 @@
}
}
},
"fraction": {
"type": "object",
"additionalProperties": false,
"description": "Set how ordinary fraction numbers should be displayed",
"properties": {
"ndigits": {
"oneOf": [
{
"type": "number",
"description": "Set the number of digits to keep after the decimal point when formatting ordinary fraction numbers",
"minimum": 0,
"maximum": 9
},
{
"type": "null",
"description": "The number of digits will be automatically determined based on the value"
}
],
"default": null
}
}
},
"noBuffer": {
"type": "boolean",
"description": "Whether to disable the stdout application buffer",
Expand Down
49 changes: 49 additions & 0 deletions presets/examples/27.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1
}
},
"display": {
"separator": " "
},
"modules": [
"break",
"title",
{
"type": "os",
"key": "os ",
"keyColor": "red"
},
{
"type": "kernel",
"key": "kernel",
"keyColor": "green"
},
{
"type": "host",
"format": "{vendor} {family}",
"key": "host ",
"keyColor": "yellow"
},
{
"type": "packages",
"key": "pkgs ",
"keyColor": "blue"
},
{
"type": "uptime",
"format": "{?days}{days}d {?}{hours}h {minutes}m",
"key": "uptime",
"keyColor": "magenta"
},
{
"type": "memory",
"key": "memory",
"keyColor": "cyan"
},
"break"
]
}
11 changes: 9 additions & 2 deletions src/common/format.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg)
ffStrbufAppend(buffer, (FFstrbuf*)formatarg->value);
break;
case FF_FORMAT_ARG_TYPE_FLOAT:
ffStrbufAppendF(buffer, "%f", *(float*)formatarg->value);
if (instance.config.display.fractionNdigits >= 0)
ffStrbufAppendF(buffer, "%.*f", instance.config.display.fractionNdigits, *(float*)formatarg->value);
else
ffStrbufAppendF(buffer, "%g", *(float*)formatarg->value);
break;
case FF_FORMAT_ARG_TYPE_DOUBLE:
ffStrbufAppendF(buffer, "%g", *(double*)formatarg->value);
if (instance.config.display.fractionNdigits >= 0)
ffStrbufAppendF(buffer, "%.*f", instance.config.display.fractionNdigits, *(double*)formatarg->value);
else
ffStrbufAppendF(buffer, "%g", *(double*)formatarg->value);
break;
case FF_FORMAT_ARG_TYPE_BOOL:
ffStrbufAppendS(buffer, *(bool*)formatarg->value ? "true" : "false");
Expand Down Expand Up @@ -108,6 +114,7 @@ static inline bool formatArgSet(const FFformatarg* arg)
{
return arg->value != NULL && (
(arg->type == FF_FORMAT_ARG_TYPE_DOUBLE && *(double*)arg->value > 0.0) || //Also is false for NaN
(arg->type == FF_FORMAT_ARG_TYPE_FLOAT && *(float*)arg->value > 0.0) || //Also is false for NaN
(arg->type == FF_FORMAT_ARG_TYPE_INT && *(int*)arg->value > 0) ||
(arg->type == FF_FORMAT_ARG_TYPE_STRBUF && ((FFstrbuf*)arg->value)->length > 0) ||
(arg->type == FF_FORMAT_ARG_TYPE_STRING && ffStrSet((char*)arg->value)) ||
Expand Down
2 changes: 1 addition & 1 deletion src/common/library.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void* ffLibraryLoad(const char* path, int maxVersion, ...);
FF_MAYBE_UNUSED void* libraryObjectName = NULL; // Placeholder

#define FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, symbolMapping, symbolName, returnValue) \
symbolMapping = (__typeof__(&symbolName)) &symbolName
symbolMapping = (__typeof__(&symbolName)) &symbolName;

#define FF_LIBRARY_LOAD_SYMBOL(library, symbolName, returnValue) \
FF_MAYBE_UNUSED __typeof__(&symbolName) FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, ff ## symbolName, symbolName, returnValue);
Expand Down
2 changes: 1 addition & 1 deletion src/common/networking/networking_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "util/debug.h"

#include <unistd.h>
#include <sys/poll.h>
#include <poll.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netdb.h>
Expand Down
Loading
Loading