summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-12-17 19:08:56 -0300
committerBenBE <BenBE@geshi.org>2020-12-19 16:02:34 +0100
commite8c6994f40c9c69089e9f80abb2f895d2e077c7e (patch)
tree7e5078da157f8efba1b3d3b82c95fed6c3276f9c /Settings.c
parent3d1703f16faf5bd3c73976909e1b6e03061a7f72 (diff)
Add "Tree view is always sorted by PID" option to mimic htop 2 behavior
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Settings.c b/Settings.c
index 0b4d0ed6..3b629a87 100644
--- a/Settings.c
+++ b/Settings.c
@@ -141,6 +141,8 @@ static bool Settings_read(Settings* this, const char* fileName, int initialCpuCo
this->direction = atoi(option[1]);
} else if (String_eq(option[0], "tree_view")) {
this->treeView = atoi(option[1]);
+ } else if (String_eq(option[0], "tree_view_always_by_pid")) {
+ this->treeViewAlwaysByPID = atoi(option[1]);
} else if (String_eq(option[0], "hide_kernel_threads")) {
this->hideKernelThreads = atoi(option[1]);
} else if (String_eq(option[0], "hide_userland_threads")) {
@@ -287,6 +289,7 @@ bool Settings_write(Settings* this) {
fprintf(fd, "strip_exe_from_cmdline=%d\n", (int) this->stripExeFromCmdline);
fprintf(fd, "show_merged_command=%d\n", (int) this->showMergedCommand);
fprintf(fd, "tree_view=%d\n", (int) this->treeView);
+ fprintf(fd, "tree_view_always_by_pid=%d\n", (int) this->treeViewAlwaysByPID);
fprintf(fd, "header_margin=%d\n", (int) this->headerMargin);
fprintf(fd, "detailed_cpu_time=%d\n", (int) this->detailedCPUTime);
fprintf(fd, "cpu_count_from_one=%d\n", (int) this->countCPUsFromOne);

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