From e8c6994f40c9c69089e9f80abb2f895d2e077c7e Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 17 Dec 2020 19:08:56 -0300 Subject: Add "Tree view is always sorted by PID" option to mimic htop 2 behavior --- Settings.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Settings.c') 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); -- cgit v1.2.3