Skip to content

Commit

Permalink
Merge pull request fastfetch-cli#665 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release v2.4.0
  • Loading branch information
CarterLi committed Dec 18, 2023
2 parents c4824b2 + d84ae91 commit 5ede47f
Show file tree
Hide file tree
Showing 73 changed files with 1,507 additions and 655 deletions.
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: '[BUG] '
labels: bug
assignees: ''

Expand All @@ -24,12 +24,9 @@ The content of the configuration file you use (if any)
//paste here
```

Output of `env NO_CONFIG=1 fastfetch --load-config all --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false`:
Output of `fastfetch -c ci.jsonc --format json`:
<!--
Note that this output will contain you public IP. If it is not relevant for the issue, feel free to remove it before uploading.
If you get the following error: `Error: couldn't find config: [...]`, copy the files in [presets](../../presets/) to `/usr/share/fastfetch/presets/` or `~/.local/share/fastfetch/presets/`.
If this isn't possible (or too much work) for you, post the output of `env NO_CONFIG=1 fastfetch --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false && fastfetch --version`.
-->

```
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: '[FEAT] '
labels: enhancement
assignees: ''

---

<!-- Before requesting a new feature, please try `fastfetch -c all.jsonc` to see if it has been supported -->

# Current state:

# Wanted state:
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/logo_request.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
name: Logo request
about: Request a new logo
title: ''
title: '[LOGO] '
labels: logo request
assignees: ''

---

# OS
```
paste content of /etc/os-release here. If this file doesn't exist, describe a way to identify the distro.
Paste content of /etc/os-release here. If this file doesn't exist, describe a way to identify the distro.
```

# Ascii
```
paste ascii art here. If you leave this empty, i will try to find the logo myself.
Paste ascii art here.
```
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ jobs:
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
cscope.*
tags
fastfetch.kdev4
*.user
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# 2.4.0

**We are deprecating flags based config files (will be removed in v3.0.0). We suggest you migrate to json based config files.** One may use `-c /path/to/config.conf --gen-config` to migrate existing flag based config files.

Changes:
* All flag based presets are removed

Features:
* Improve performance of detecting rpm and pkg package count (Packages, Linux / FreeBSD)
* Support Apple M3X temperature detection (CPU / GPU, macOS)
* `--ds-force-drm` support a new option `sysfs-only`
* Improve xfce4 version detection
* Detect WM and DE by enumerating running processes (WM / DE, FreeBSD)
* Add a new module `Physical Disk`, which detects product name, full size, serial number and so on.

Bugfixes:
* Fix crashes sometimes when `--logo-padding-top` is not set (Logo)
* Fix memory usage counting algorithm (Memory, macOS)
* Fix the behavior of `--no-buffer` in Windows
* Fix possible segfault in some devices (Display, Linux)
* Fix segfaults on first use of new images with Sixel flag (Image)

Logo:
* Remove unnecessary escaping for Adelie logo
* Add EshanizedOS

# 2.3.4

Bugfixes:
Expand Down
10 changes: 8 additions & 2 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.3.4
VERSION 2.4.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -340,6 +340,7 @@ set(LIBFASTFETCH_SRC
src/modules/opengl/opengl.c
src/modules/os/os.c
src/modules/packages/packages.c
src/modules/physicaldisk/physicaldisk.c
src/modules/processes/processes.c
src/modules/player/player.c
src/modules/poweradapter/poweradapter.c
Expand Down Expand Up @@ -394,6 +395,7 @@ if(LINUX)
src/detection/cursor/cursor_linux.c
src/detection/bluetooth/bluetooth_linux.c
src/detection/disk/disk_linux.c
src/detection/physicaldisk/physicaldisk_linux.c
src/detection/diskio/diskio_linux.c
src/detection/displayserver/linux/displayserver_linux.c
src/detection/displayserver/linux/drm.c
Expand Down Expand Up @@ -453,6 +455,7 @@ elseif(ANDROID)
src/detection/cursor/cursor_nosupport.c
src/detection/cpuusage/cpuusage_linux.c
src/detection/disk/disk_linux.c
src/detection/physicaldisk/physicaldisk_linux.c
src/detection/diskio/diskio_linux.c
src/detection/displayserver/displayserver_android.c
src/detection/font/font_nosupport.c
Expand Down Expand Up @@ -506,6 +509,7 @@ elseif(BSD)
src/detection/cpuusage/cpuusage_bsd.c
src/detection/cursor/cursor_linux.c
src/detection/disk/disk_bsd.c
src/detection/physicaldisk/physicaldisk_bsd.c
src/detection/diskio/diskio_bsd.c
src/detection/displayserver/linux/displayserver_linux.c
src/detection/displayserver/linux/drm.c
Expand All @@ -529,7 +533,7 @@ elseif(BSD)
src/detection/netio/netio_bsd.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_linux.c
src/detection/packages/packages_linux.c
src/detection/packages/packages_bsd.c
src/detection/poweradapter/poweradapter_nosupport.c
src/detection/processes/processes_bsd.c
src/detection/gtk_qt/qt.c
Expand Down Expand Up @@ -566,6 +570,7 @@ elseif(APPLE)
src/detection/cpuusage/cpuusage_apple.c
src/detection/cursor/cursor_apple.m
src/detection/disk/disk_bsd.c
src/detection/physicaldisk/physicaldisk_apple.c
src/detection/diskio/diskio_apple.c
src/detection/displayserver/displayserver_apple.c
src/detection/font/font_apple.m
Expand Down Expand Up @@ -619,6 +624,7 @@ elseif(WIN32)
src/detection/cpuusage/cpuusage_windows.c
src/detection/cursor/cursor_windows.c
src/detection/disk/disk_windows.c
src/detection/physicaldisk/physicaldisk_windows.c
src/detection/diskio/diskio_windows.c
src/detection/displayserver/displayserver_windows.c
src/detection/font/font_windows.c
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,15 @@ Q: Why do you need a very performant version of neofetch?
Q: It does not display [*] correctly for me, what can I do?
> 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
## Star History

Give it a star to support us!

<a href="https://star-history.com/#fastfetch-cli/fastfetch&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date" />
</picture>
</a>
47 changes: 45 additions & 2 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,24 @@
"description": "Set the path to the file containing OS information. Linux only"
},
"dsForceDrm": {
"type": "boolean",
"description": "Force display detection to use `/sys/class/drm`. Linux only",
"description": "Force display detection to use DRM. Linux only",
"oneOf": [
{
"type": "bool",
"const": false,
"description": "Try `wayland`, then `x11`, then `drm`"
},
{
"type": "string",
"description": "Use `/sys/class/drm` only.",
"const": "sysfs-only"
},
{
"type": "bool",
"const": true,
"description": "Try `libdrm` first, then `sysfs` if libdrm failed"
}
],
"default": false
},
"wmiTimeout": {
Expand Down Expand Up @@ -584,6 +600,7 @@
"opengl",
"os",
"packages",
"physicaldisk",
"player",
"poweradapter",
"processes",
Expand Down Expand Up @@ -1353,6 +1370,32 @@
}
}
},
{
"title": "Physical Disk",
"properties": {
"type": {
"description": "Print physical disk information",
"const": "physicaldisk"
},
"namePrefix": {
"description": "Show disks with given name prefix only",
"type": "string"
},
"key": {
"$ref": "#/$defs/key"
},
"keyColor": {
"$ref": "#/$defs/keyColor"
},
"keyWidth": {
"$ref": "#/$defs/keyWidth"
},
"format": {
"$ref": "#/$defs/format"
}
},
"additionalProperties": false
},
{
"title": "Public IP",
"properties": {
Expand Down
1 change: 0 additions & 1 deletion presets/all

This file was deleted.

1 change: 1 addition & 0 deletions presets/all.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"weather",
"netio",
"diskio",
"physicaldisk",
"version",
"break",
"colors"
Expand Down
3 changes: 0 additions & 3 deletions presets/btw

This file was deleted.

1 change: 1 addition & 0 deletions presets/ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
},
"netio",
"diskio",
"physicaldisk",
"version",
"break",
"colors"
Expand Down
1 change: 0 additions & 1 deletion presets/examples/1

This file was deleted.

24 changes: 0 additions & 24 deletions presets/examples/2

This file was deleted.

7 changes: 0 additions & 7 deletions presets/examples/3

This file was deleted.

7 changes: 0 additions & 7 deletions presets/examples/4

This file was deleted.

11 changes: 0 additions & 11 deletions presets/examples/5

This file was deleted.

4 changes: 0 additions & 4 deletions presets/hardware

This file was deleted.

9 changes: 0 additions & 9 deletions presets/neofetch

This file was deleted.

5 changes: 0 additions & 5 deletions presets/paleofetch

This file was deleted.

1 change: 0 additions & 1 deletion presets/software

This file was deleted.

5 changes: 4 additions & 1 deletion src/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ void ffStart(void)
ffHideCursor = instance.config.display.hideCursor && !instance.config.display.pipe && !instance.state.resultDoc;

#ifdef _WIN32
setvbuf(stdout, NULL, _IOFBF, instance.config.display.noBuffer ? 0 : 4096);
if (instance.config.display.noBuffer)
setvbuf(stdout, NULL, _IONBF, 0);
else
setvbuf(stdout, NULL, _IOFBF, 4096);
SetConsoleCtrlHandler(consoleHandler, TRUE);
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD mode = 0;
Expand Down
Loading

0 comments on commit 5ede47f

Please sign in to comment.