Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
da9c928
CMake: make artifact file names consistant
CarterLi Feb 13, 2024
3a96ade
CPU (Linux): don't segfault if we fail to find `Vendor ID` in `lscpu`
CarterLi Feb 13, 2024
706527e
Github: update `ISSUE_TEMPLATE`
CarterLi Feb 13, 2024
925dc6f
TerminalFont (Windows): support portable Windows Terminal settings
CarterLi Feb 13, 2024
17f4a6e
Colors: support `block` related settings
CarterLi Feb 14, 2024
853ca0f
Platform (Windows): don't assume x86 as i686
CarterLi Feb 15, 2024
2731756
Platform (Windows): small optimization
CarterLi Feb 15, 2024
eda38e1
Colors: don't print extra empty lines
CarterLi Feb 15, 2024
937611a
Colors: support JSON config generation
CarterLi Feb 15, 2024
e0297e1
DiskIO: add option `--diskio-detect-total`
CarterLi Feb 20, 2024
6ad1262
NetIO: add option `--netio-detect-total`
CarterLi Feb 20, 2024
5b20a86
Fix mistake in README.md (#730)
Lenchog Feb 21, 2024
90e99bc
Doc: fix invalid commands
CarterLi Feb 20, 2024
6a0c7ca
Disk (Linux): try fixing multidevice bcachefs filesystem compatibility
CarterLi Feb 21, 2024
4e9ee9a
Package: code cleanup
CarterLi Feb 21, 2024
15bb5bf
Packages: add ability to disable specified package manager
CarterLi Feb 21, 2024
77db2d8
FFstrbuf: remove ffStrbufCompAlphabetically
CarterLi Feb 22, 2024
5e7cfe2
Display: add option `--display-order`
CarterLi Feb 22, 2024
5fb4b6d
Display: `--display-compact-type` support `*-with-refresh-rate`
CarterLi Feb 22, 2024
4b747f7
Disk (Linux): ensure only physical devices are detected
CarterLi Feb 23, 2024
4c7a9e4
Doc: update changelog
CarterLi Feb 23, 2024
b80391b
Release: v2.8.4
CarterLi Feb 23, 2024
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
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ Output of `fastfetch --list-features`:
Paste the stacktrace here. You may get it with:

```
$ gdb /path/to/fastfetch
$ run
$ bt
$ gdb -q -ex 'set confirm off' -ex run -ex 'bt full' -ex quit --args /path/to/fastfetch
```

If you are able to identify which module crashed, the strace can be helpful too
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 2.8.4

Bugfixes:
* Fix segfault if we fail to find `Vendor ID` in `lscpu` (#718, CPU, Linux)
* Fix multi-device bcachefs filesystem compatibility (#731, Disk, Linux)

Features:
* Support portable Windows Terminal settings (#720, Terminal, Windows)
* Support `--color-block-width` and `--color-block-range` (#721, Colors)
* Support `--diskio-detect-total` to show total bytes read/written (DiskIO)
* Support `--netio-detect-total` to show total bytes received/sent (NetIO)
* Support `--packages-disabled` to disable specified package manager (#729, Packages)
* Support `--display-order` to sort multiple displays in a specific order (Display)
* Support `--display-compact-type original-with-refresh-rate` to show refresh rates in compact (oneline) mode (Display)

# 2.8.3

Bugfixes:
Expand Down
5 changes: 4 additions & 1 deletion 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.8.3
VERSION 2.8.4
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -1112,6 +1112,9 @@ set(CPACK_GENERATOR "TGZ;ZIP")
if(APPLE)
string(TOLOWER "${CMAKE_PROJECT_NAME}-macos-universal" CPACK_PACKAGE_FILE_NAME)
else() # We don't use this in Windows
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(CMAKE_SYSTEM_PROCESSOR "amd64")
endif()
string(TOLOWER "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
endif()

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ There are [screenshots on different platforms](https://github.com/fastfetch-cli/
* Fedora: `sudo dnf install fastfetch`
* Gentoo: `sudo emerge --ask app-misc/fastfetch`
* Alpine: `apk add --upgrade fastfetch`
* NixOS: `sudo nix-shell -p fastfetch`
* NixOS: `nix-shell -p fastfetch`
* openSUSE: `sudo zypper install fastfetch`
* ALT Linux: `sudo apt-get install fastfetch`

Expand Down
54 changes: 49 additions & 5 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,29 @@
"type": "integer",
"minimum": 0,
"default": 0
},
"block": {
"description": "Set behavior of block printing",
"type": "object",
"properties": {
"width": {
"description": "Set the block width in spaces",
"type": "integer",
"minimum": 1,
"default": 3
},
"range": {
"description": "Set the range of colors in the blocks to print",
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
},
"minItems": 2,
"maxItems": 2
}
}
}
}
},
Expand Down Expand Up @@ -1078,7 +1101,9 @@
"enum": [
"none",
"original",
"scaled"
"scaled",
"original-with-refresh-rate",
"scaled-with-refresh-rate"
],
"description": "Set if all displays should be printed in one line",
"default": "none"
Expand All @@ -1088,6 +1113,15 @@
"type": "boolean",
"default": false
},
"order": {
"description": "Set the order should be used when printing",
"enum": [
"none",
"asc",
"desc"
],
"default": "none"
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down Expand Up @@ -1173,6 +1207,11 @@
"description": "Show disks with given name prefix only",
"type": "string"
},
"detectTotal": {
"description": "Detect total bytes instead of current rate",
"type": "boolean",
"default": false
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down Expand Up @@ -1382,6 +1421,11 @@
"type": "boolean",
"default": true
},
"detectTotal": {
"description": "Detect total bytes instead of current rate",
"type": "boolean",
"default": false
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down Expand Up @@ -1436,10 +1480,10 @@
"const": "packages",
"description": "List installed package managers and count of installed packages"
},
"winget": {
"description": "Set if winget package count should be detected.\nNote this is very slow operation. Please make sure `winget list` works before enable this option\nWindows only",
"type": "boolean",
"default": false
"disabled": {
"description": "A colon separated list of package managers to be disabled when detecting",
"type": "string",
"default": "winget"
},
"key": {
"$ref": "#/$defs/key"
Expand Down
114 changes: 102 additions & 12 deletions src/data/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@
{
"long": "ds-force-drm",
"desc": "Set if only DRM should be used to detect displays",
"remark": "Use this option if you encountered problems with other detection method. Linux only",
"remark": [
"Use this option if you encountered problems with other detection method.",
"Linux only"
],
"arg": {
"type": "enum",
"optional": true,
Expand Down Expand Up @@ -537,7 +540,13 @@
{
"long": "percent-type",
"desc": "Set the percentage output type",
"remark": "1 for percentage number, 2 for bar, 3 for both, 6 for bar only, 9 for colored number",
"remark": [
"1 for percentage number",
"2 for bar",
"3 for both",
"6 for bar only",
"9 for colored number"
],
"arg": {
"type": "num",
"default": 9
Expand Down Expand Up @@ -963,6 +972,14 @@
"default": false
}
},
{
"long": "diskio-detect-total",
"desc": "Detect total bytes instead of current rate",
"arg": {
"type": "bool",
"default": false
}
},
{
"long": "diskio-name-prefix",
"desc": "Show disks with given name prefix only",
Expand Down Expand Up @@ -996,13 +1013,16 @@
}
},
{
"long": "packages-winget",
"desc": "Set if winget package count should be detected",
"remark": "This option is extremely slow. You may need to increase value of '--processing-timeout' to make it actually work",
"long": "packages-disabled",
"desc": "A colon separated list of package managers to be disabled when detecting",
"remark": [
"Some detection methods can be very slow.",
"You may need to increase value of '--processing-timeout' to make it actually work.",
"Use `--packages-disabled none` to enable all."
],
"arg": {
"type": "bool",
"optional": true,
"default": false
"type": "string",
"default": "winget"
}
},
{
Expand All @@ -1013,7 +1033,9 @@
"enum": {
"none": "Disable this compact mode",
"original": "Print original resolutions",
"scaled": "Print scaled resolutions"
"scaled": "Print scaled resolutions",
"original-with-refresh-rate": "Print original resolutions with refresh rate",
"scaled-with-refresh-rate": "Print scaled resolutions with refresh rate"
},
"default": "none"
}
Expand All @@ -1027,6 +1049,19 @@
"default": false
}
},
{
"long": "display-order",
"desc": "Set the order should be used when printing displays",
"arg": {
"type": "enum",
"enum": {
"none": "Use the detected order",
"asc": "Sort by display name ascendingly",
"desc": "Sort by display name descendingly"
},
"default": "none"
}
},
{
"long": "brightness-ddcci-sleep",
"desc": "Set the sleep times (in ms) when sending DDC/CI requests",
Expand All @@ -1052,7 +1087,10 @@
{
"long": "battery-use-setup-api",
"desc": "Set if \"SetupAPI\" should be used on Windows to detect battery info",
"remark": "SetupAPI supports multi batteries, but slower. Windows only",
"remark": [
"SetupAPI supports multi batteries, but slower.",
"Windows only"
],
"arg": {
"type": "bool",
"optional": true,
Expand Down Expand Up @@ -1088,7 +1126,10 @@
{
"long": "de-slow-version-detection",
"desc": "Set if DE version should be detected with slow operations",
"remark": "Usually is not necessary. Linux only",
"remark": [
"It's only used as a fallback method. Please file a bug report if you encounter any issues.",
"Linux only"
],
"arg": {
"type": "bool",
"optional": true,
Expand All @@ -1107,7 +1148,10 @@
{
"long": "gpu-driver-specific",
"desc": "Use driver specific method to detect more detailed GPU information (memory usage, core count, etc)",
"remark": "Correctly NVML (NVIDIA) and IGCL (Intel, Windows only) are supported. Both require the latest proprietary driver to be installed",
"remark": [
"Correctly NVML (NVIDIA) and IGCL (Intel, Windows only) are supported.",
"Both require the latest proprietary driver to be installed."
],
"arg": {
"type": "bool",
"optional": true,
Expand Down Expand Up @@ -1225,6 +1269,14 @@
"default": true
}
},
{
"long": "netio-detect-total",
"desc": "Detect total bytes instead of current rate",
"arg": {
"type": "bool",
"default": false
}
},
{
"long": "publicip-timeout",
"desc": "Time in milliseconds to wait for the public ip server to respond",
Expand Down Expand Up @@ -1342,6 +1394,44 @@
"type": "num",
"default": 0
}
},
{
"long": "colors-block-width",
"desc": "Set the block width in spaces",
"arg": {
"type": "num",
"default": 3
}
},
{
"long": "colors-block-range-start",
"desc": "Set the start range of colors in the blocks to print",
"remark": [
"Display colors 0-15 in the blocks. (16 colors)",
"Display colors 0-7 in the blocks. (8 colors)",
"Only works for `--colors-symbol block`.",
"Must be in range 0-15",
"See also `--colors-range-end`"
],
"arg": {
"type": "num",
"default": 0
}
},
{
"long": "colors-block-range-end",
"desc": "Set the end range of colors in the blocks to print",
"remark": [
"Display colors 0-15 in the blocks. (16 colors)",
"Display colors 0-7 in the blocks. (8 colors)",
"Only works for `--colors-symbol block`.",
"Must be in range 0-15",
"See also `--colors-range-start`"
],
"arg": {
"type": "num",
"default": 15
}
}
],
"General module": [
Expand Down
4 changes: 4 additions & 0 deletions src/detection/cpu/cpu_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
return NULL;
}
}
else
{
pstart = buffer.chars;
}
}

while ((pstart = strstr(pstart, "Model name:")))
Expand Down
6 changes: 3 additions & 3 deletions src/detection/disk/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

const char* ffDetectDisksImpl(FFlist* disks);

static int compareDisks(const void* disk1, const void* disk2)
static int compareDisks(const FFDisk* disk1, const FFDisk* disk2)
{
return ffStrbufCompAlphabetically(&((const FFDisk*) disk1)->mountpoint, &((const FFDisk*) disk2)->mountpoint);
return ffStrbufComp(&disk1->mountpoint, &disk2->mountpoint);
}

const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks)
Expand All @@ -18,7 +18,7 @@ const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks)
// For example for /boot/efi/bootmgr we need to check /boot/efi before /boot
//Note that we sort alphabetically here for a better ordering when printing the list,
// so the check must be done in reverse order
ffListSort(disks, compareDisks);
ffListSort(disks, (void*) compareDisks);
FF_LIST_FOR_EACH(FFDisk, disk, *disks)
{
if(disk->bytesTotal == 0)
Expand Down
4 changes: 4 additions & 0 deletions src/detection/disk/disk_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ static bool isPhysicalDevice(const struct mntent* device)
if(!ffStrStartsWith(device->mnt_fsname, "/dev/"))
return false;

//#731
if(ffStrEquals(device->mnt_type, "bcachefs"))
return true;

if(
ffStrStartsWith(device->mnt_fsname + 5, "loop") || //Ignore loop devices
ffStrStartsWith(device->mnt_fsname + 5, "ram") || //Ignore ram devices
Expand Down
Loading