Skip to content

Commit 43bdb68

Browse files
authored
Merge pull request #949 from fastfetch-cli/dev
Release: v2.13.0
2 parents 215029e + 8b43e33 commit 43bdb68

Some content is hidden

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

64 files changed

+1364
-253
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ assignees: ''
77

88
---
99

10+
Be sure to read [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
11+
1012
<!-- We will try hard to solve the issue. However since platforms and hardwares vary greatly, it can be hard to find the root cause is. Providing following information may help us greatly. Thanks in advance -->
1113

1214
# General description of bug:
@@ -74,10 +76,5 @@ Use `time fastfetch --stat` to show time usage for each module.
7476

7577
## If fastfetch behaves incorrectly on shell starting
7678

77-
<!-- NOTE for zsh / p10k users:
78-
There are known incompatibility between fastfetch and p10k instant prompt.
79-
The p10k doc clearly states that you should NOT print anything to stdout after p10k-instant-prompt is initialized.
80-
You should either put `fastfetch` before initialization of p10k-instant-prompt (recommended), remove it or use `fastfetch --pipe false` -->
81-
8279
* The bug is reproduceable with fresh / clean shell configuration (i.e. `fastfetch` is the single line of `.zshrc` or `~/.config/fish/config.fish`):
8380
* Does `sleep 1` before running `fastfetch` work?

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ jobs:
484484
with:
485485
msystem: CLANG32
486486
update: true
487-
install: git mingw-w64-clang-i686-7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-vulkan-headers mingw-w64-clang-i686-opencl-icd
487+
install: git p7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-vulkan-headers mingw-w64-clang-i686-opencl-icd
488488

489489
- name: print msys version
490490
run: uname -a

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# 2.13.0
2+
3+
Changes:
4+
* Option `--gpu-force-vulkan <?bool>` has been changed to `--gpu-detection-method <enum>`
5+
* Use `--gpu-detection-method vulkan` to get the old behavior
6+
* See `fastfetch -h gpu-detection-method` for detail
7+
* In Linux, BIOS limited CPU frequency is printed by default to match the behavior of neofetch (CPU, Linux, #947)
8+
9+
Features:
10+
* Add new module `Bootmgr` which prints information of stage 2 bootloader (grub, system-boot, etc)
11+
* Requires root permission to work on Windows and FreeBSD
12+
* Requires booting in UEFI mode
13+
* Add package manager lpkg and lpkg-build support (Packages, Linux)
14+
* Improve macOS 10.13 compatibility (macOS)
15+
* Detect core count for performance / efficiency cores (CPU)
16+
* Test it with `fastfetch -s cpu --cpu-format '{9}'`
17+
* Support min / max frequency and physical core count detection in FreeBSD, if kernel supports it (CPU, FreeBSD)
18+
* Detect DRM driver version if DRM detection method is used (GPU, Linux)
19+
20+
Bugfixes:
21+
* Don't detect `clifm` and `valgrind` as a terminal (Terminal, Linux)
22+
* Improve stability (PhysicalMemory, FreeBSD)
23+
* Fix bssid & status detection (Wifi, FreeBSD)
24+
* Ensure createTime is correctly initialized (Disk, FreeBSD / macOS)
25+
* Fix `--cpu-freq-ndigits` not working if `--cpu-format` is used
26+
* Fix `nix-user` package count detection (Packages, Linux)
27+
* Fix some memory leaks
28+
29+
Logos:
30+
* Fix Manjaro logo not displayed
31+
* Add SpoinkOS
32+
* Add Loc-OS
33+
* Add Furreto Linux
34+
* Fix TorizonCore logo colors
35+
* Fix KDE neon logo not displayed
36+
137
# 2.12.0
238

339
Changes:
@@ -20,6 +56,7 @@ Features:
2056
* Add option `--localip-show-all-ips` to show all IPs assigned to the same interface (LocalIP)
2157
* Default to `false`
2258
* Improve compatibility with `(*term)` (#909, Terminal, macOS)
59+
* Support GPU core count and frequency detection for Asahi Linux (GPU, Linux)
2360

2461
Bugfixes:
2562
* Rename option `--temperature-unit` to `--temp-unit` as documented in help messages

CMakeLists.txt

Lines changed: 9 additions & 2 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.12.0
4+
VERSION 2.13.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -115,7 +115,7 @@ endif()
115115

116116
if(WIN32)
117117
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--tsaware -Wl,--build-id -Wl,--subsystem,console:6.1,--major-os-version,6,--minor-os-version,1")
118-
elseif(APPLE)
118+
elseif(APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang")
119119
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc")
120120
endif()
121121

@@ -284,6 +284,7 @@ set(LIBFASTFETCH_SRC
284284
src/common/properties.c
285285
src/common/settings.c
286286
src/common/temps.c
287+
src/detection/bootmgr/bootmgr.c
287288
src/detection/chassis/chassis.c
288289
src/detection/cpu/cpu.c
289290
src/detection/cpuusage/cpuusage.c
@@ -314,6 +315,7 @@ set(LIBFASTFETCH_SRC
314315
src/modules/bios/bios.c
315316
src/modules/bluetooth/bluetooth.c
316317
src/modules/board/board.c
318+
src/modules/bootmgr/bootmgr.c
317319
src/modules/brightness/brightness.c
318320
src/modules/break/break.c
319321
src/modules/camera/camera.c
@@ -394,6 +396,7 @@ if(LINUX)
394396
src/detection/battery/battery_linux.c
395397
src/detection/bios/bios_linux.c
396398
src/detection/board/board_linux.c
399+
src/detection/bootmgr/bootmgr_linux.c
397400
src/detection/brightness/brightness_linux.c
398401
src/detection/chassis/chassis_linux.c
399402
src/detection/cpu/cpu_linux.c
@@ -462,6 +465,7 @@ elseif(ANDROID)
462465
src/detection/bios/bios_android.c
463466
src/detection/bluetooth/bluetooth_nosupport.c
464467
src/detection/board/board_android.c
468+
src/detection/bootmgr/bootmgr_nosupport.c
465469
src/detection/brightness/brightness_nosupport.c
466470
src/detection/chassis/chassis_nosupport.c
467471
src/detection/cpu/cpu_linux.c
@@ -520,6 +524,7 @@ elseif(BSD)
520524
src/detection/bios/bios_bsd.c
521525
src/detection/bluetooth/bluetooth_linux.c
522526
src/detection/board/board_bsd.c
527+
src/detection/bootmgr/bootmgr_bsd.c
523528
src/detection/brightness/brightness_bsd.c
524529
src/detection/chassis/chassis_bsd.c
525530
src/detection/cpu/cpu_bsd.c
@@ -588,6 +593,7 @@ elseif(APPLE)
588593
src/detection/bios/bios_apple.c
589594
src/detection/bluetooth/bluetooth_apple.m
590595
src/detection/board/board_apple.c
596+
src/detection/bootmgr/bootmgr_apple.c
591597
src/detection/brightness/brightness_apple.c
592598
src/detection/chassis/chassis_nosupport.c
593599
src/detection/cpu/cpu_apple.c
@@ -647,6 +653,7 @@ elseif(WIN32)
647653
src/detection/bios/bios_windows.c
648654
src/detection/bluetooth/bluetooth_windows.c
649655
src/detection/board/board_windows.c
656+
src/detection/bootmgr/bootmgr_windows.c
650657
src/detection/brightness/brightness_windows.cpp
651658
src/detection/chassis/chassis_windows.c
652659
src/detection/cpu/cpu_windows.c

README.md

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,90 @@ Logos can be heavily customized too; see the [logo documentation](https://github
101101

102102
## FAQ
103103

104-
Q: Why do you need a very performant version of neofetch?
105-
> I like putting neofetch in my ~/.bashrc to have a system overview whenever I use the terminal, but the slow speed annoyed me, so I created this. Also neofetch didn't output everything correctly (e.g Font is displayed as "[Plasma], Noto Sans, 10 [GTK2/3]") and writing my own tool gave me the possibility to fine tune it to run perfectly on at least my configuration.
104+
### Q: Neofetch is good enough. Why do I need fastfetch?
106105

107-
Q: It does not display [*] correctly for me, what can I do?
108-
> This is most likely because your system is not implemented (yet). At the moment I am focusing more on making the core app better, than adding more configurations. Feel free to open a pull request if you want to add support for your configuration
106+
1. Fastfetch is actively maintained.
107+
2. Fastfetch is faster. As the name suggests.
108+
3. Fastfetch is more feature-rich. By default fastfetch only has a few modules enabled. Use `fastfetch -c all` to find what you want.
109+
4. Fastfetch is more configurable. You can find more information in the Wiki: <https://github.com/fastfetch-cli/fastfetch/wiki/Configuration>
110+
5. Fastfetch is more polished. For example, neofetch prints `555MiB` in `Memory` module and `23G` in `Disk` module (notibily the difference of `MiB` and `G`), while fastfetch prints `555.00 MiB` and `22.97 GiB` respectively.
111+
6. Fastfetch is more accurate. For example, [neofetch never actually supports Wayland protocol](https://github.com/dylanaraps/neofetch/pull/2395).
112+
113+
### Q: Fastfetch shows my local IP address. It leaks my privacy!
114+
115+
A local IP (10.x.x.x, 172.x.x.x, 192.168.x.x) has nothing to do with privacy. It only makes sense if you are on the same network, for example, if you connect to the same Wi-Fi network.
116+
117+
Actually the `Local IP` module is the most useful module for me personally. I (@CarterLi) have several VMs installed to test fastfetch and often need to SSH into them. I have fastfetch running on shell startup and I never need to type `ip addr` manually.
118+
119+
If you really don't like it, you can disable the `Local IP` module in `config.jsonc`.
120+
121+
### Q: Where is the config file? I can't find it.
122+
123+
`Fastfetch` don't generate config file automatically. You can use `fastfetch --gen-config` to generate one. The config file will be saved in `~/.config/fastfetch/config.jsonc` by default. See [Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration).
124+
125+
### Q: The configuration is so complex. Where is the documentation?
126+
127+
Fastfetch uses JSON (with comments) for configuration. I suggest you use an IDE with JSON schema support (like VSCode) to edit it.
128+
129+
Alternatively, you can refer to the presets in [`presets` directory](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets).
130+
131+
### Q: I WANT THE DOCUMENTATION!
132+
133+
[Here is the documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Json-Schema). It is generated from [JSON schema](https://github.com/fastfetch-cli/fastfetch/blob/dev/doc/json_schema.json) but you won't like it.
134+
135+
### Q: How can I customize the module output?
136+
137+
Fastfetch uses `format` to generate output. For example to make `GPU` module show GPU name only and ignore other information, you can use
138+
139+
```jsonc
140+
{
141+
"modules": [
142+
{
143+
"type": "gpu",
144+
"format": "{2}" // See `fastfetch -h gpu-format` for detail
145+
}
146+
]
147+
}
148+
```
149+
150+
which is equivalent to `fastfetch -s gpu --gpu-format '{2}'`
151+
152+
See `fastfetch -h format` for basic usage. For module specific formattion, see `fastfetch -h <module>-format`
153+
154+
### Q: I have my own ascii-art / image file. How can I show it with fastfetch?
155+
156+
Try `fastfetch -l /path/to/logo`. See [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for detail.
157+
158+
### Q: Fastfetch runs in white and black on shell startup. Why?
159+
160+
This issue usually happens when using fastfetch with `p10k`. There are known incompatibility between fastfetch and p10k instant prompt.
161+
The p10k doc clearly states that you should NOT print anything to stdout after `p10k-instant-prompt` is initialized. You should either put `fastfetch` before initialization of `p10k-instant-prompt` (recommended)
162+
163+
You can always use `fastfetch --pipe false` to force fastfetch running in colorful mode.
164+
165+
### Q: I want feature A / B / C. Will fastfetch support it?
166+
167+
Fastfetch is a system information tool. We only accept hardware or system level software feature requests. For most personal uses, I recommend using `Command` module to detect it yourself, which can be used to grab output from a custom shell script:
168+
169+
```jsonc
170+
// This module shows the default editor
171+
{
172+
"modules": [
173+
{
174+
"type": "command",
175+
"text": "$EDITOR --version | head -1",
176+
"key": "Editor"
177+
}
178+
]
179+
}
180+
```
181+
182+
Otherwise, open a feature request in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues).
183+
184+
### Q: I have questions. Where can I get help?
185+
186+
* For usage questions, please start a discussion in [GitHub Discussions](https://github.com/fastfetch-cli/fastfetch/discussions).
187+
* For possible bugs, please open an issue in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues). Be sure to fill the bug-report template carefully for developers to investigate.
109188

110189
## Star History
111190

completions/bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ __fastfetch_completion()
197197
"--disk-show-subvolumes"
198198
"--gpu-hide-integrated"
199199
"--gpu-hide-discrete"
200-
"--gpu-force-vulkan"
200+
"--gpu-force-method"
201201
"--disk-show-unknown"
202202
"--bluetooth-show-disconnected"
203203
)

completions/fish

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ string match -r -a -g "^###> ?(.*)" < (status -f) | string collect | python3 | s
8585
###> elif type == 'config':
8686
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_config)"')
8787
###> elif type == 'enum':
88-
###> temp: str = ' '.join(map(lambda x: f"{x[0]}\\t{x[1]}", flag["arg"]["enum"].items()))
89-
###> print(f'{command_prefix} -x -a "{temp}"')
88+
###> print(f'{command_prefix} -x -a "{' '.join(flag["arg"]["enum"])}"')
9089
###> elif type == 'logo':
9190
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_logo)"')
9291
###> elif type == 'structure':

doc/json_schema.json

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@
680680
"bios",
681681
"bluetooth",
682682
"board",
683+
"bootmgr",
683684
"break",
684685
"brightness",
685686
"camera",
@@ -713,6 +714,7 @@
713714
"os",
714715
"packages",
715716
"physicaldisk",
717+
"physicalmemory",
716718
"player",
717719
"poweradapter",
718720
"processes",
@@ -771,12 +773,16 @@
771773
"anyOf": [
772774
{
773775
"const": "bios",
774-
"description": "Print BIOS name, version, release date, etc"
776+
"description": "Print information of 1st-stage bootloader (name, version, release date, etc)"
775777
},
776778
{
777779
"const": "board",
778780
"description": "Print mather board name and other info"
779781
},
782+
{
783+
"const": "bootmgr",
784+
"description": "Print information of 2nd-stage bootloader (name, firmware, etc)"
785+
},
780786
{
781787
"const": "camera",
782788
"description": "Print available cameras"
@@ -829,6 +835,10 @@
829835
"const": "os",
830836
"description": "Print operating system name and version"
831837
},
838+
{
839+
"const": "physicalmemory",
840+
"description": "Print system physical memory devices"
841+
},
832842
{
833843
"const": "player",
834844
"description": "Print music player name"
@@ -1445,10 +1455,16 @@
14451455
"type": "boolean",
14461456
"default": false
14471457
},
1448-
"forceVulkan": {
1449-
"description": "Force using vulkan to detect GPUs, which support video memory usage detection with `--allow-slow-operations`",
1450-
"type": "boolean",
1451-
"default": false
1458+
"detectionMethod": {
1459+
"description": "Force using a specified method to detect GPUs",
1460+
"type": "string",
1461+
"enum": [
1462+
"auto",
1463+
"pci",
1464+
"vulkan",
1465+
"opengl"
1466+
],
1467+
"default": "auto"
14521468
},
14531469
"hideType": {
14541470
"description": "Specify the type of GPUs should not be printed",

src/common/modules.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ static FFModuleBaseInfo* B[] = {
99
(void*) &instance.config.modules.bios,
1010
(void*) &instance.config.modules.bluetooth,
1111
(void*) &instance.config.modules.board,
12+
(void*) &instance.config.modules.bootmgr,
1213
(void*) &instance.config.modules.break_,
1314
(void*) &instance.config.modules.brightness,
1415
NULL,

src/data/help.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,13 +1197,18 @@
11971197
}
11981198
},
11991199
{
1200-
"long": "gpu-force-vulkan",
1201-
"desc": "Force using vulkan to detect GPUs",
1202-
"remark": "Vulkan supports video memory usage detection",
1200+
"long": "gpu-detection-method",
1201+
"desc": "Force using a specified method to detect GPUs",
1202+
"remark": "Methods are used in this order: DRM (Linux only) -> PCI (Linux, FreeBSD and other platform specific methods) -> Vulkan -> OpenGL",
12031203
"arg": {
1204-
"type": "bool",
1205-
"optional": true,
1206-
"default": false
1204+
"type": "enum",
1205+
"enum": {
1206+
"auto": "Use DRM if available, which is most feature-rich. Requires proper DRM driver installed",
1207+
"pci": "Search PCI devices, which do not requires any driver installed",
1208+
"vulkan": "Use Vulkan API. Slow and requires vulkan driver installed",
1209+
"opengl": "Use OpenGL API. Slow and only detects one GPU"
1210+
},
1211+
"default": "auto"
12071212
}
12081213
},
12091214
{

0 commit comments

Comments
 (0)