diff --git a/completions/bash b/completions/bash index d08a71c55..3a30c9b30 100644 --- a/completions/bash +++ b/completions/bash @@ -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" diff --git a/presets/verbose b/presets/verbose index 78314b7b3..eefd2f3bd 100644 --- a/presets/verbose +++ b/presets/verbose @@ -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: {} diff --git a/src/data/config_user.txt b/src/data/config_user.txt index 0c91e60e6..2ccb2e8b9 100644 --- a/src/data/config_user.txt +++ b/src/data/config_user.txt @@ -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 diff --git a/src/data/help.txt b/src/data/help.txt index c4132cf83..3008888b7 100644 --- a/src/data/help.txt +++ b/src/data/help.txt @@ -108,7 +108,7 @@ Module specific options: --os-file : Set the path to the file containing OS information --disk-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 : Set if regular volume should be printed. Default is true - --disk-show-removable : Set if removable volume should be printed. Default is true + --disk-show-external : Set if external volume should be printed. Default is true --disk-show-hidden : Set if hidden volumes should be printed. Default is false --disk-show-subvolumes : Set if subvolumes should be printed. Default is false --disk-show-unknown : Set if unknown (unable to detect sizes) volumes should be printed. Default is false diff --git a/src/fastfetch.c b/src/fastfetch.c index cea9b37c1..fb548178b 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -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" ); diff --git a/src/modules/disk/disk.c b/src/modules/disk/disk.c index 1bacc0bda..4ff74d129 100644 --- a/src/modules/disk/disk.c +++ b/src/modules/disk/disk.c @@ -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;