Skip to content

Commit 7e235b6

Browse files
authored
Merge pull request #1766 from fastfetch-cli/dev
Release: v2.44.0
2 parents 6b92659 + f43e1fd commit 7e235b6

31 files changed

+428
-21
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 2.44.0
2+
3+
Features:
4+
* Add option `--disk-hide-folders` and `--disk-hide-fs` to hide specific mountpoints and filesystems in Disk module (Disk)
5+
* `--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.
6+
7+
Bugfixes:
8+
* Fix Apple Terminal compatibility with `--stat` (macOS, #1755)
9+
* Ignore `/usr/bin/script` when detecting shell and terminal (Terminal / Shell, #1761)
10+
* Fix compatibility with KDE Plasma 6.4 which is in beta currently (Display, Linux, #1765)
11+
12+
Logos:
13+
* Add Kylin (#1760)
14+
* Add UBLinux (#1764)
15+
116
# 2.43.0
217

318
Features:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
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.43.0
4+
VERSION 2.44.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for
2121
<img src="screenshots/example3.png" width="48%" align="top" />
2222
<img src="screenshots/example5.png" height="15%" align="top" />
2323

24+
According configuration files for examples are located [here](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples).
25+
2426
There are [screenshots on different platforms](https://github.com/fastfetch-cli/fastfetch/wiki).
2527

2628
## Installation

completions/fastfetch.fish

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,17 @@ end
6262
echo '
6363
import json, subprocess, sys
6464
65+
6566
def main():
6667
data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))
6768
6869
for key in data:
6970
for flag in data[key]:
71+
if flag["long"] == "logo-color-[1-9]":
72+
for i in range(1, 10):
73+
print(f"""complete -c fastfetch -d "{flag["desc"]}" -l "logo-color-{i}" -x -a "(__fastfetch_complete_color)" """)
74+
continue
75+
7076
if flag.get("pseudo", False):
7177
continue
7278
@@ -75,7 +81,7 @@ def main():
7581
command_prefix += f""" -o {flag["short"]}"""
7682
7783
if "arg" in flag:
78-
type: str = flag["arg"]["type"];
84+
type: str = flag["arg"]["type"]
7985
if type == "bool":
8086
print(f"{command_prefix} -x -a \"(__fastfetch_complete_bool)\"")
8187
elif type == "color":
@@ -98,6 +104,7 @@ def main():
98104
else:
99105
print(f"{command_prefix} -f")
100106
107+
101108
if __name__ == "__main__":
102109
try:
103110
main()

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.43.0) jammy; urgency=medium
2+
3+
* Update to 2.43.0
4+
5+
-- Carter Li <[email protected]> Wed, 14 May 2025 09:49:50 +0800
6+
17
fastfetch (2.42.0) jammy; urgency=medium
28

39
* Update to 2.42.0

debian/files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.42.0_source.buildinfo universe/utils optional
1+
fastfetch_2.43.0_source.buildinfo universe/utils optional

doc/json_schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,14 @@
17541754
"type": "string",
17551755
"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"
17561756
},
1757+
"hideFolders": {
1758+
"type": "string",
1759+
"description": "A colon (semicolon on Windows) separated list of folder paths to hide from the disk output\nDefault: /efi:/boot:/boot/efi"
1760+
},
1761+
"hideFS": {
1762+
"type": "string",
1763+
"description": "A colon separated file systems to hide from the disk output"
1764+
},
17571765
"showExternal": {
17581766
"type": "boolean",
17591767
"description": "Set if external volume should be printed",

src/common/commandoption.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc)
134134
int len = snprintf(str, sizeof str, "%.3fms", ms);
135135
if (thres > 0)
136136
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);
137-
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
137+
printf("\e7\e[1A\e[9999999C\e[%dD%s\e8", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
138138
}
139139
}
140140

src/common/jsonconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
224224
int len = snprintf(str, sizeof str, "%.3fms", ms);
225225
if (thres > 0)
226226
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);
227-
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
227+
printf("\e7\e[1A\e[9999999C\e[%dD%s\e8", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
228228
}
229229
}
230230

src/data/help.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,22 @@
840840
"default": "Auto detection using mount-points"
841841
}
842842
},
843+
{
844+
"long": "disk-hide-folders",
845+
"desc": "A colon (semicolon on Windows) separated list of folder paths to hide from the disk output",
846+
"arg": {
847+
"type": "path",
848+
"default": "/efi:/boot:/boot/efi"
849+
}
850+
},
851+
{
852+
"long": "disk-hide-fs",
853+
"desc": "A colon separated list of file systems to hide from the disk output",
854+
"arg": {
855+
"type": "string",
856+
"default": ""
857+
}
858+
},
843859
{
844860
"long": "disk-show-regular",
845861
"desc": "Specify whether regular volumes should be displayed",

src/detection/disk/disk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "disk.h"
22

3-
bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint)
3+
bool ffDiskMatchMountpoint(FFstrbuf* folders, const char* mountpoint)
44
{
55
#ifdef _WIN32
66
const char separator = ';';
@@ -11,12 +11,12 @@ bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint)
1111
uint32_t mountpointLength = (uint32_t) strlen(mountpoint);
1212

1313
uint32_t startIndex = 0;
14-
while(startIndex < options->folders.length)
14+
while(startIndex < folders->length)
1515
{
16-
uint32_t colonIndex = ffStrbufNextIndexC(&options->folders, startIndex, separator);
16+
uint32_t colonIndex = ffStrbufNextIndexC(folders, startIndex, separator);
1717

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

2222
startIndex = colonIndex + 1;

src/detection/disk/disk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ typedef struct FFDisk
2828
const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks /* list of FFDisk */);
2929

3030
const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks);
31-
bool ffDiskMatchMountpoint(FFDiskOptions* options, const char* mountpoint);
31+
bool ffDiskMatchMountpoint(FFstrbuf* folders, const char* mountpoint);

src/detection/disk/disk_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
145145
{
146146
if(__builtin_expect(options->folders.length > 0, 0))
147147
{
148-
if(!ffDiskMatchMountpoint(options, fs->f_mntonname))
148+
if(!ffDiskMatchMountpoint(&options->folders, fs->f_mntonname))
149149
continue;
150150
}
151151
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs"))

src/detection/disk/disk_haiku.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
2323

2424
if (__builtin_expect(options->folders.length, 0))
2525
{
26-
if (!ffDiskMatchMountpoint(options, path.Path()))
26+
if (!ffDiskMatchMountpoint(&options->folders, path.Path()))
2727
continue;
2828
}
2929

src/detection/disk/disk_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static bool isRemovable(FFDisk* currentDisk)
220220

221221
static void detectType(const FFlist* disks, FFDisk* currentDisk, struct mntent* device)
222222
{
223-
if(ffStrbufStartsWithS(&currentDisk->mountpoint, "/boot") || ffStrbufStartsWithS(&currentDisk->mountpoint, "/efi"))
223+
if(hasmntopt(device, "x-gvfs-hide") || hasmntopt(device, "hidden"))
224224
currentDisk->type = FF_DISK_VOLUME_TYPE_HIDDEN_BIT;
225225
else if(isSubvolume(disks, currentDisk))
226226
currentDisk->type = FF_DISK_VOLUME_TYPE_SUBVOLUME_BIT;
@@ -281,7 +281,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
281281
{
282282
if (__builtin_expect(options->folders.length, 0))
283283
{
284-
if (!ffDiskMatchMountpoint(options, device->mnt_dir))
284+
if (!ffDiskMatchMountpoint(&options->folders, device->mnt_dir))
285285
continue;
286286
}
287287
else if(!isPhysicalDevice(device))

src/detection/disk/disk_sunos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
113113
{
114114
if (__builtin_expect(options->folders.length, 0))
115115
{
116-
if (!ffDiskMatchMountpoint(options, device.mnt_mountp))
116+
if (!ffDiskMatchMountpoint(&options->folders, device.mnt_mountp))
117117
continue;
118118
}
119119
else if(!isPhysicalDevice(&device))

src/detection/disk/disk_windows.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
4747

4848
if (__builtin_expect((long) options->folders.length, 0))
4949
{
50-
if (!ffDiskMatchMountpoint(options, buffer.chars))
50+
if (!ffDiskMatchMountpoint(&options->folders, buffer.chars))
5151
continue;
5252
}
5353
else if(driveType == DRIVE_NO_ROOT_DIR)

0 commit comments

Comments
 (0)