Skip to content

Release: v2.44.0 #1766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 2.44.0

Features:
* Add option `--disk-hide-folders` and `--disk-hide-fs` to hide specific mountpoints and filesystems in Disk module (Disk)
* `--disk-hide-folders` defaults to `/efi:/boot:/boot/efi` on Linux and *BSD. Previously these EFI-related folders were hardcoded to be hidden on Linux.

Bugfixes:
* Fix Apple Terminal compatibility with `--stat` (macOS, #1755)
* Ignore `/usr/bin/script` when detecting shell and terminal (Terminal / Shell, #1761)
* Fix compatibility with KDE Plasma 6.4 which is in beta currently (Display, Linux, #1765)

Logos:
* Add Kylin (#1760)
* Add UBLinux (#1764)

# 2.43.0

Features:
Expand Down
2 changes: 1 addition & 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.43.0
VERSION 2.44.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for
<img src="screenshots/example3.png" width="48%" align="top" />
<img src="screenshots/example5.png" height="15%" align="top" />

According configuration files for examples are located [here](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples).

There are [screenshots on different platforms](https://github.com/fastfetch-cli/fastfetch/wiki).

## Installation
Expand Down
9 changes: 8 additions & 1 deletion completions/fastfetch.fish
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ end
echo '
import json, subprocess, sys


def main():
data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))

for key in data:
for flag in data[key]:
if flag["long"] == "logo-color-[1-9]":
for i in range(1, 10):
print(f"""complete -c fastfetch -d "{flag["desc"]}" -l "logo-color-{i}" -x -a "(__fastfetch_complete_color)" """)
continue

if flag.get("pseudo", False):
continue

Expand All @@ -75,7 +81,7 @@ def main():
command_prefix += f""" -o {flag["short"]}"""

if "arg" in flag:
type: str = flag["arg"]["type"];
type: str = flag["arg"]["type"]
if type == "bool":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_bool)\"")
elif type == "color":
Expand All @@ -98,6 +104,7 @@ def main():
else:
print(f"{command_prefix} -f")


if __name__ == "__main__":
try:
main()
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.43.0) jammy; urgency=medium

* Update to 2.43.0

-- Carter Li <[email protected]> Wed, 14 May 2025 09:49:50 +0800

fastfetch (2.42.0) jammy; urgency=medium

* Update to 2.42.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.42.0_source.buildinfo universe/utils optional
fastfetch_2.43.0_source.buildinfo universe/utils optional
8 changes: 8 additions & 0 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,14 @@
"type": "string",
"description": "A colon (semicolon on Windows) separated list of folder paths for the disk output\nDefault: auto detection using mount-points\nThis option overrides other `show*` options"
},
"hideFolders": {
"type": "string",
"description": "A colon (semicolon on Windows) separated list of folder paths to hide from the disk output\nDefault: /efi:/boot:/boot/efi"
},
"hideFS": {
"type": "string",
"description": "A colon separated file systems to hide from the disk output"
},
"showExternal": {
"type": "boolean",
"description": "Set if external volume should be printed",
Expand Down
2 changes: 1 addition & 1 deletion src/common/commandoption.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc)
int len = snprintf(str, sizeof str, "%.3fms", ms);
if (thres > 0)
snprintf(str, sizeof str, "\e[%sm%.3fms\e[m", (ms <= thres ? FF_COLOR_FG_GREEN : ms <= 2 * thres ? FF_COLOR_FG_YELLOW : FF_COLOR_FG_RED), ms);
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
printf("\e7\e[1A\e[9999999C\e[%dD%s\e8", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/jsonconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
int len = snprintf(str, sizeof str, "%.3fms", ms);
if (thres > 0)
snprintf(str, sizeof str, "\e[%sm%.3fms\e[m", (ms <= thres ? FF_COLOR_FG_GREEN : ms <= 2 * thres ? FF_COLOR_FG_YELLOW : FF_COLOR_FG_RED), ms);
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
printf("\e7\e[1A\e[9999999C\e[%dD%s\e8", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
}
}

Expand Down
16 changes: 16 additions & 0 deletions src/data/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,22 @@
"default": "Auto detection using mount-points"
}
},
{
"long": "disk-hide-folders",
"desc": "A colon (semicolon on Windows) separated list of folder paths to hide from the disk output",
"arg": {
"type": "path",
"default": "/efi:/boot:/boot/efi"
}
},
{
"long": "disk-hide-fs",
"desc": "A colon separated list of file systems to hide from the disk output",
"arg": {
"type": "string",
"default": ""
}
},
{
"long": "disk-show-regular",
"desc": "Specify whether regular volumes should be displayed",
Expand Down
8 changes: 4 additions & 4 deletions src/detection/disk/disk.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "disk.h"

bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint)
bool ffDiskMatchMountpoint(FFstrbuf* folders, const char* mountpoint)
{
#ifdef _WIN32
const char separator = ';';
Expand All @@ -11,12 +11,12 @@ bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint)
uint32_t mountpointLength = (uint32_t) strlen(mountpoint);

uint32_t startIndex = 0;
while(startIndex < options->folders.length)
while(startIndex < folders->length)
{
uint32_t colonIndex = ffStrbufNextIndexC(&options->folders, startIndex, separator);
uint32_t colonIndex = ffStrbufNextIndexC(folders, startIndex, separator);

uint32_t folderLength = colonIndex - startIndex;
if (folderLength == mountpointLength && memcmp(options->folders.chars + startIndex, mountpoint, mountpointLength) == 0)
if (folderLength == mountpointLength && memcmp(folders->chars + startIndex, mountpoint, mountpointLength) == 0)
return true;

startIndex = colonIndex + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/detection/disk/disk.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ typedef struct FFDisk
const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks /* list of FFDisk */);

const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks);
bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint);
bool ffDiskMatchMountpoint(FFstrbuf* folders, const char* mountpoint);
2 changes: 1 addition & 1 deletion src/detection/disk/disk_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
{
if(__builtin_expect(options->folders.length > 0, 0))
{
if(!ffDiskMatchMountpoint(options, fs->f_mntonname))
if(!ffDiskMatchMountpoint(&options->folders, fs->f_mntonname))
continue;
}
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs"))
Expand Down
2 changes: 1 addition & 1 deletion src/detection/disk/disk_haiku.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)

if (__builtin_expect(options->folders.length, 0))
{
if (!ffDiskMatchMountpoint(options, path.Path()))
if (!ffDiskMatchMountpoint(&options->folders, path.Path()))
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/detection/disk/disk_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static bool isRemovable(FFDisk* currentDisk)

static void detectType(const FFlist* disks, FFDisk* currentDisk, struct mntent* device)
{
if(ffStrbufStartsWithS(&currentDisk->mountpoint, "/boot") || ffStrbufStartsWithS(&currentDisk->mountpoint, "/efi"))
if(hasmntopt(device, "x-gvfs-hide") || hasmntopt(device, "hidden"))
currentDisk->type = FF_DISK_VOLUME_TYPE_HIDDEN_BIT;
else if(isSubvolume(disks, currentDisk))
currentDisk->type = FF_DISK_VOLUME_TYPE_SUBVOLUME_BIT;
Expand Down Expand Up @@ -281,7 +281,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
{
if (__builtin_expect(options->folders.length, 0))
{
if (!ffDiskMatchMountpoint(options, device->mnt_dir))
if (!ffDiskMatchMountpoint(&options->folders, device->mnt_dir))
continue;
}
else if(!isPhysicalDevice(device))
Expand Down
2 changes: 1 addition & 1 deletion src/detection/disk/disk_sunos.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
{
if (__builtin_expect(options->folders.length, 0))
{
if (!ffDiskMatchMountpoint(options, device.mnt_mountp))
if (!ffDiskMatchMountpoint(&options->folders, device.mnt_mountp))
continue;
}
else if(!isPhysicalDevice(&device))
Expand Down
2 changes: 1 addition & 1 deletion src/detection/disk/disk_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)

if (__builtin_expect((long) options->folders.length, 0))
{
if (!ffDiskMatchMountpoint(options, buffer.chars))
if (!ffDiskMatchMountpoint(&options->folders, buffer.chars))
continue;
}
else if(driveType == DRIVE_NO_ROOT_DIR)
Expand Down
Loading
Loading