diff options
author | Daniel Lange <DLange@git.local> | 2021-02-12 18:48:09 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-02-13 16:47:04 +0100 |
commit | 2c6222e30a25a833e8554709818e1c378ca46848 (patch) | |
tree | 676239606f4fbc2fd6c11bf2b675edd9bd1cbdc1 /Settings.c | |
parent | c44b2ec795d243126fd5a53169ec533f4a5b3bd0 (diff) |
Option and key ("*") to collapse / expand all branches under PID 1
(and PID 2 if kernel threads are shown)
Based on hishamhm/htop#510 by Krishna Chaitanya, B
Closes #68
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -163,6 +163,8 @@ static bool Settings_read(Settings* this, const char* fileName, int initialCpuCo 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], "all_branches_collapsed")) { + this->allBranchesCollapsed = 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")) { @@ -314,6 +316,7 @@ bool Settings_write(Settings* this) { 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, "all_branches_collapsed=%d\n", (int) this->allBranchesCollapsed); 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); @@ -352,6 +355,7 @@ Settings* Settings_new(int initialCpuCount) { this->hideKernelThreads = false; this->hideUserlandThreads = false; this->treeView = false; + this->allBranchesCollapsed = false; this->highlightBaseName = false; this->highlightMegabytes = false; this->detailedCPUTime = false; |