summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-08-20 14:47:07 +1000
committerNathan Scott <nathans@redhat.com>2020-08-20 14:47:07 +1000
commit6b443c5da9227221ed793616f156800ab4ee2717 (patch)
treea545f96ff0d3a7c022efec5eccf8a6ec796c9b03 /Settings.c
parent011125dab2338acac9c4bbc7b04604f01f40e54b (diff)
parent81b64691a7ee55e5c665ac78290495b0aea946d7 (diff)
Merge branch 'hishamhm-pull-932'
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Settings.c b/Settings.c
index 69a94a8b..116595b4 100644
--- a/Settings.c
+++ b/Settings.c
@@ -45,6 +45,8 @@ typedef struct Settings_ {
bool countCPUsFromZero;
bool detailedCPUTime;
+ bool showCPUUsage;
+ bool showCPUFrequency;
bool treeView;
bool showProgramPath;
bool hideThreads;
@@ -224,6 +226,10 @@ 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")) {
this->updateProcessNames = atoi(option[1]);
} else if (String_eq(option[0], "account_guest_in_cpu_meter")) {
@@ -315,6 +321,8 @@ 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);
fprintf(fd, "color_scheme=%d\n", (int) this->colorScheme);
@@ -344,6 +352,8 @@ 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;
this->showProgramPath = true;

© 2014-2024 Faster IT GmbH | imprint | privacy policy