mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
Disk (Linux): revisits 78c6d71049
This commit is contained in:
@@ -13,6 +13,8 @@ Features:
|
||||
* Adds basic support for Wine (Windows)
|
||||
* Adds basic support for hppa and sh architectures (CPU, Linux)
|
||||
* Improves T-Head SoC name detection from the device tree (#1997, CPU, Linux)
|
||||
* `Disk.hideFolders` now supports glob patterns (Disk)
|
||||
* For example, `/boot/*` will match both `/boot/efi` and `/boot/firmware`
|
||||
|
||||
Bugfixes:
|
||||
* Avoids integer overflow when calculating swap size (#1988, Swap, Windows)
|
||||
|
||||
@@ -2326,7 +2326,7 @@
|
||||
]
|
||||
},
|
||||
"hideFolders": {
|
||||
"description": "A list of folder paths to hide from the disk output",
|
||||
"description": "A list of folder paths (or glob patterns) to hide from the disk output",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2342,7 +2342,7 @@
|
||||
"uniqueItems": true
|
||||
}
|
||||
],
|
||||
"default": "/efi:/boot:/boot/efi:/boot/firmware"
|
||||
"default": "/efi:/boot:/boot/*"
|
||||
},
|
||||
"hideFS": {
|
||||
"description": "A list of file systems to hide from the disk output",
|
||||
|
||||
@@ -230,11 +230,8 @@ bool ffPrintDisk(FFDiskOptions* options)
|
||||
if(__builtin_expect(options->folders.length == 0, 1) && (disk->type & ~options->showTypes))
|
||||
continue;
|
||||
|
||||
if (options->hideFolders.length)
|
||||
{
|
||||
if (isMatchFolders(&options->hideFolders, &disk->mountpoint, FF_DISK_FOLDER_SEPARATOR))
|
||||
continue;
|
||||
}
|
||||
if (options->hideFolders.length && isMatchFolders(&options->hideFolders, &disk->mountpoint, FF_DISK_FOLDER_SEPARATOR))
|
||||
continue;
|
||||
|
||||
if (options->hideFS.length && ffStrbufSeparatedContain(&options->hideFS, &disk->filesystem, ':'))
|
||||
continue;
|
||||
@@ -482,7 +479,7 @@ void ffInitDiskOptions(FFDiskOptions* options)
|
||||
#if _WIN32 || __APPLE__ || __ANDROID__
|
||||
ffStrbufInit(&options->hideFolders);
|
||||
#else
|
||||
ffStrbufInitS(&options->hideFolders, "/efi:/boot:/boot/efi:/boot/firmware");
|
||||
ffStrbufInitS(&options->hideFolders, "/efi:/boot:/boot/*");
|
||||
#endif
|
||||
ffStrbufInit(&options->hideFS);
|
||||
options->showTypes = FF_DISK_VOLUME_TYPE_REGULAR_BIT | FF_DISK_VOLUME_TYPE_EXTERNAL_BIT | FF_DISK_VOLUME_TYPE_READONLY_BIT;
|
||||
|
||||
Reference in New Issue
Block a user