[v0.95] Add --raw option

This commit is contained in:
Dr-Noob
2021-03-15 21:49:47 +01:00
parent a8d8ac2e91
commit db32cccd91
6 changed files with 98 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
static const char* VERSION = "0.95";
void print_help(char *argv[]) {
printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);
printf("Usage: %s [--version] [--help] [--debug] [--raw] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);
printf("Options: \n\
--color Set the color scheme. By default, cpufetch uses the system color scheme. This option \n\
@@ -31,7 +31,8 @@ void print_help(char *argv[]) {
--style Set the style of CPU art: \n\
* \"fancy\": Default style \n\
* \"retro\": Old cpufetch style \n\
* \"legacy\": Fallback style for terminals that does not support colors \n\n");
* \"legacy\": Fallback style for terminals that does not support colors \n\n\
--raw Dump raw cpuid information \n\n");
#ifdef ARCH_X86
printf(" --debug Prints CPU model and cpuid levels (debug purposes)\n\n");
@@ -81,6 +82,12 @@ int main(int argc, char* argv[]) {
return EXIT_SUCCESS;
}
if(show_raw()) {
print_version();
print_raw(cpu);
return EXIT_SUCCESS;
}
if(print_cpufetch(cpu, get_style(), get_colors()))
return EXIT_SUCCESS;
else