diff options
author | Arnavion <arnavion@gmail.com> | 2019-08-10 11:20:21 -0700 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2019-08-10 11:20:21 -0700 |
commit | 1d5e6a27a05ed44e6364a5b14c925503f8604a1f (patch) | |
tree | a250edaefa7049842a8d827e2d851fc9b2f8e91e /Settings.c | |
parent | 9703a25d1b30a25aead4802fecd462dfac36e011 (diff) |
Add a display option to hide CPU usage number from CPU meter.
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -45,6 +45,7 @@ typedef struct Settings_ { bool countCPUsFromZero; bool detailedCPUTime; + bool showCPUUsage; bool showCPUFrequency; bool treeView; bool showProgramPath; @@ -224,6 +225,8 @@ static bool Settings_read(Settings* this, const char* fileName) { this->detailedCPUTime = atoi(option[1]); } else if (String_eq(option[0], "cpu_count_from_zero")) { this->countCPUsFromZero = atoi(option[1]); + } else if (String_eq(option[0], "show_cpu_usage")) { + this->showCPUUsage = atoi(option[1]); } else if (String_eq(option[0], "show_cpu_frequency")) { this->showCPUFrequency = atoi(option[1]); } else if (String_eq(option[0], "update_process_names")) { @@ -315,6 +318,7 @@ bool Settings_write(Settings* this) { fprintf(fd, "header_margin=%d\n", (int) this->headerMargin); fprintf(fd, "detailed_cpu_time=%d\n", (int) this->detailedCPUTime); fprintf(fd, "cpu_count_from_zero=%d\n", (int) this->countCPUsFromZero); + fprintf(fd, "show_cpu_usage=%d\n", (int) this->showCPUUsage); fprintf(fd, "show_cpu_frequency=%d\n", (int) this->showCPUFrequency); fprintf(fd, "update_process_names=%d\n", (int) this->updateProcessNames); fprintf(fd, "account_guest_in_cpu_meter=%d\n", (int) this->accountGuestInCPUMeter); @@ -344,6 +348,7 @@ Settings* Settings_new(int cpuCount) { this->highlightMegabytes = false; this->detailedCPUTime = false; this->countCPUsFromZero = false; + this->showCPUUsage = true; this->showCPUFrequency = false; this->updateProcessNames = false; this->cpuCount = cpuCount; |