mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Disk: add options#
This commit is contained in:
@@ -188,6 +188,8 @@ __fastfetch_completion()
|
||||
"--pipe"
|
||||
"--title-fqdn"
|
||||
"--escape-bedrock"
|
||||
"--disk-show-removable"
|
||||
"--disk-show-hidden"
|
||||
)
|
||||
|
||||
local FF_OPTIONS_STRING=(
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
--cpu-usage-format Percentage: {}
|
||||
--gpu-format Vendor: {}; Name: {}; Driver: {}; Temperature: {}; CoreCount: {}
|
||||
--memory-format Used: {}; Total: {}; Percentage: {}
|
||||
--disk-format Used: {}; Total: {}; Files: {}; Percentage: {}
|
||||
--disk-format SizeUsed: {}; SizeTotal: {}; SizePercentage: {}; FilesUsed: {}; FilesTotal: {}; FilesPercentage: {}; Removable: {}; Hidden: {}; Filesystem: {}
|
||||
--battery-format Manufactor: {}; Model: {}; Technology: {}; Capacity: {}; Status: {}
|
||||
--poweradapter-format Watts: {}; Name: {}; Manufactor: {}; Model: {}; Description: {}
|
||||
--player-format Pretty: {}; Name: {}; Bus: {}; Url: {}
|
||||
|
||||
+20
-19
@@ -87,25 +87,26 @@ Library options: Set the path of a library to load
|
||||
--lib-cjson <path>
|
||||
|
||||
Module specific options:
|
||||
--title-fqdn <?value>: Sets if the title should use fully qualified domain name. Default is false.
|
||||
--separator-string <str>: Set the string printed by the separator module
|
||||
--os-file <path>: Set the path to the file containing OS informations
|
||||
--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-removable <?value>: Sets if removable volume should be printed. Default is false
|
||||
--battery-dir <folder>: The directory where the battery folders are. Standard: /sys/class/power_supply/
|
||||
--cpu-temp <?value>: Detect and display CPU temperature if supported. Default is false
|
||||
--gpu-temp <?value>: Detect and display GPU temperature if supported. Default is false
|
||||
--battery-temp <?value>: Detect and display Battery temperature if supported. Default is false
|
||||
--localip-show-ipv4 <?value>: Show ipv4 addresses in local ip module. Default is true
|
||||
--localip-show-ipv6 <?value>: Show ipv6 addresses in local ip module. Default is false
|
||||
--localip-show-loop <?value>: Show loop back addresses (127.0.0.1) in local ip module. Default is false
|
||||
--localip-name-prefix <str>: Show ips with given name prefix only. Default is empty
|
||||
--public-ip-timeout: Time in milliseconds to wait for the public ip server to respond. Default is disabled (0)
|
||||
--public-ip-url: The URL of public IP detection server to be used.
|
||||
--weather-timeout: Time in milliseconds to wait for the weather server to respond. Default is disabled (0)
|
||||
--weather-output-format: The output weather format to be used. It must be URI encoded.
|
||||
--player-name: The name of the player to use
|
||||
--gl <value>: Sets the opengl context creation library to use. Must be auto, egl, glx or osmesa. Default is auto
|
||||
--title-fqdn <?value>: Sets if the title should use fully qualified domain name. Default is false.
|
||||
--separator-string <str>: Set the string printed by the separator module
|
||||
--os-file <path>: Set the path to the file containing OS informations
|
||||
--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-removable <?value>: Sets if removable volume should be printed. Default is true.
|
||||
--disk-show-hidden <?value>: Sets if hidden volumes should be printed. Default is false
|
||||
--battery-dir <folder>: The directory where the battery folders are. Standard: /sys/class/power_supply/
|
||||
--cpu-temp <?value>: Detect and display CPU temperature if supported. Default is false
|
||||
--gpu-temp <?value>: Detect and display GPU temperature if supported. Default is false
|
||||
--battery-temp <?value>: Detect and display Battery temperature if supported. Default is false
|
||||
--localip-show-ipv4 <?value>: Show ipv4 addresses in local ip module. Default is true
|
||||
--localip-show-ipv6 <?value>: Show ipv6 addresses in local ip module. Default is false
|
||||
--localip-show-loop <?value>: Show loop back addresses (127.0.0.1) in local ip module. Default is false
|
||||
--localip-name-prefix <str>: Show ips with given name prefix only. Default is empty
|
||||
--public-ip-timeout: Time in milliseconds to wait for the public ip server to respond. Default is disabled (0)
|
||||
--public-ip-url: The URL of public IP detection server to be used.
|
||||
--weather-timeout: Time in milliseconds to wait for the weather server to respond. Default is disabled (0)
|
||||
--weather-output-format: The output weather format to be used. It must be URI encoded.
|
||||
--player-name: The name of the player to use
|
||||
--gl <value>: Sets the opengl context creation library to use. Must be auto, egl, glx or osmesa. Default is auto
|
||||
|
||||
Parsing is not case sensitive. E.g. "--lib-PCI" is equal to "--Lib-Pci"
|
||||
If a value starts with a ?, it is optional. "true" will be used if not set.
|
||||
|
||||
@@ -12,7 +12,7 @@ void ffDetectDisksImpl(FFDiskResult* disks)
|
||||
return;
|
||||
}
|
||||
|
||||
char* buff = malloc(length + 1);
|
||||
char* buf = malloc(length + 1);
|
||||
GetLogicalDriveStringsA(length, buf);
|
||||
|
||||
for(uint32_t i = 0; i < length; i++)
|
||||
|
||||
+14
-5
@@ -300,11 +300,16 @@ static inline void printCommandHelp(const char* command)
|
||||
}
|
||||
else if(strcasecmp(command, "disk-format") == 0)
|
||||
{
|
||||
constructAndPrintCommandHelpFormat("disk", "{}GiB / {}GiB ({4}%)", 4,
|
||||
"Used size",
|
||||
"Total size",
|
||||
"Percentage used",
|
||||
"Num files"
|
||||
constructAndPrintCommandHelpFormat("disk", "{1} / {2} ({3}%)", 9,
|
||||
"Size used",
|
||||
"Size total",
|
||||
"Size percentage",
|
||||
"Files used",
|
||||
"Files total",
|
||||
"Files percentage",
|
||||
"True if removable volume",
|
||||
"True if hidden volume",
|
||||
"Filesystem"
|
||||
);
|
||||
}
|
||||
else if(strcasecmp(command, "battery-format") == 0)
|
||||
@@ -1314,6 +1319,10 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
instance->config.titleFQDN = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--disk-folders") == 0)
|
||||
optionParseString(key, value, &instance->config.diskFolders);
|
||||
else if(strcasecmp(key, "--disk-show-removable") == 0)
|
||||
instance->config.diskShowRemovable = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--disk-show-hidden") == 0)
|
||||
instance->config.diskShowHidden = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--battery-dir") == 0)
|
||||
optionParseString(key, value, &instance->config.batteryDir);
|
||||
else if(strcasecmp(key, "--separator-string") == 0)
|
||||
|
||||
Reference in New Issue
Block a user