mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Disk: change removable to external; print filesystem by default
This commit is contained in:
+1
-1
@@ -194,7 +194,7 @@ __fastfetch_completion()
|
||||
"--title-fqdn"
|
||||
"--escape-bedrock"
|
||||
"--disk-folders"
|
||||
"--disk-show-removable"
|
||||
"--disk-show-external"
|
||||
"--disk-show-hidden"
|
||||
"--disk-show-subvolumes"
|
||||
"--gpu-hide-integrated"
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
--cpu-usage-format Percentage: {}
|
||||
--gpu-format Vendor: {}; Name: {}; Driver: {}; Temperature: {}; CoreCount: {}; Type: {}
|
||||
--memory-format Used: {}; Total: {}; Percentage: {}
|
||||
--disk-format SizeUsed: {}; SizeTotal: {}; SizePercentage: {}; FilesUsed: {}; FilesTotal: {}; FilesPercentage: {}; Removable: {}; Hidden: {}; Filesystem: {}; Name: {}
|
||||
--disk-format SizeUsed: {}; SizeTotal: {}; SizePercentage: {}; FilesUsed: {}; FilesTotal: {}; FilesPercentage: {}; External: {}; Hidden: {}; Filesystem: {}; Name: {}
|
||||
--battery-format Manufactor: {}; Model: {}; Technology: {}; Capacity: {}; Status: {}
|
||||
--poweradapter-format Watts: {}; Name: {}; Manufactor: {}; Model: {}; Description: {}
|
||||
--player-format Pretty: {}; Name: {}; Bus: {}; Url: {}
|
||||
|
||||
@@ -235,8 +235,8 @@
|
||||
# Disk show options
|
||||
# Sets if certain types of disk should be printed
|
||||
# Must be either true or false
|
||||
# Default is false except for --disk-show-removable.
|
||||
#--disk-show-removable true
|
||||
# Default is false except for --disk-show-external.
|
||||
#--disk-show-external true
|
||||
#--disk-show-hidden false
|
||||
#--disk-show-subvolumes false
|
||||
#--disk-show-unknown false
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ Module specific options:
|
||||
--os-file <path>: Set the path to the file containing OS information
|
||||
--disk-folders <folders>: A colon (semicolon on Windows) separated list of folder paths for the disk output. Default is "/:/home" ("C:\\;D:\\ ..." on Windows)
|
||||
--disk-show-regular <?value>: Set if regular volume should be printed. Default is true
|
||||
--disk-show-removable <?value>: Set if removable volume should be printed. Default is true
|
||||
--disk-show-external <?value>: Set if external volume should be printed. Default is true
|
||||
--disk-show-hidden <?value>: Set if hidden volumes should be printed. Default is false
|
||||
--disk-show-subvolumes <?value>: Set if subvolumes should be printed. Default is false
|
||||
--disk-show-unknown <?value>: Set if unknown (unable to detect sizes) volumes should be printed. Default is false
|
||||
|
||||
+1
-1
@@ -323,7 +323,7 @@ static inline void printCommandHelp(const char* command)
|
||||
"Files used",
|
||||
"Files total",
|
||||
"Files percentage",
|
||||
"True if removable volume",
|
||||
"True if external volume",
|
||||
"True if hidden volume",
|
||||
"Filesystem"
|
||||
);
|
||||
|
||||
+13
-4
@@ -57,8 +57,17 @@ static void printDisk(FFinstance* instance, FFDiskOptions* options, const FFDisk
|
||||
else
|
||||
ffStrbufAppendS(&str, "Unknown ");
|
||||
|
||||
if((disk->type & FF_DISK_TYPE_EXTERNAL_BIT) && !(instance->config.percentType & FF_PERCENTAGE_TYPE_HIDE_OTHERS_BIT))
|
||||
ffStrbufAppendS(&str, "[Removable]");
|
||||
if(!(instance->config.percentType & FF_PERCENTAGE_TYPE_HIDE_OTHERS_BIT))
|
||||
{
|
||||
ffStrbufAppendF(&str, "- %s ", disk->filesystem.chars);
|
||||
|
||||
if(disk->type & FF_DISK_TYPE_EXTERNAL_BIT)
|
||||
ffStrbufAppendS(&str, "[External]");
|
||||
else if(disk->type & FF_DISK_TYPE_SUBVOLUME_BIT)
|
||||
ffStrbufAppendS(&str, "[Subvolume]");
|
||||
else if(disk->type & FF_DISK_TYPE_HIDDEN_BIT)
|
||||
ffStrbufAppendS(&str, "[Hidden]");
|
||||
}
|
||||
|
||||
ffStrbufTrimRight(&str, ' ');
|
||||
ffStrbufPutTo(&str, stdout);
|
||||
@@ -188,7 +197,7 @@ bool ffParseDiskCommandOptions(FFDiskOptions* options, const char* key, const ch
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcasecmp(subKey, "show-removable") == 0)
|
||||
if (strcasecmp(subKey, "show-external") == 0)
|
||||
{
|
||||
if (ffOptionParseBoolean(value))
|
||||
options->showTypes |= FF_DISK_TYPE_EXTERNAL_BIT;
|
||||
@@ -256,7 +265,7 @@ void ffParseDiskJsonObject(FFinstance* instance, yyjson_val* module)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcasecmp(key, "showRemovable") == 0)
|
||||
if (strcasecmp(key, "showExternal") == 0)
|
||||
{
|
||||
if (yyjson_get_bool(val))
|
||||
options.showTypes |= FF_DISK_TYPE_EXTERNAL_BIT;
|
||||
|
||||
Reference in New Issue
Block a user